Hello, Sorry for the very long delay, but I'm not sure I will be of much help here. My best recommendation is to try base64 encoding the image binary data and see if that works.
I don't know anything about ASP, but one of the top searches gives this stackoverflow page with some methods for base64 encoding. http://stackoverflow.com/questions/496751/base64-encode-string-in-vbscript Good luck, and let us know how that goes. -Mike On Mon, Jan 7, 2013 at 6:04 PM, <lrya...@gmail.com> wrote: > I have tried everything to send the metadata with the binary image and > nothing works! > > strFileName=Server.MapPath("myimage.jpg") > Set objFSO = CreateObject("Scripting.FileSystemObject") > Set objFile = objFSO.GetFile(strFileName) > Set objStream = Server.CreateObject("ADODB.Stream") > objStream.Open > '-- set as binary > objStream.Type = 1 > '-- load into the stream the file > objStream.LoadFromFile(strFileName) > thesize=objStream.size > thestream=objStream.read > > strXMLtosend = "" + vbcrlf > strXMLtosend=strXMLtosend + "Media multipart posting"+ vbcrlf > strXMLtosend=strXMLtosend + "--END_OF_PART" + vbcrlf > strXMLtosend=strXMLtosend + "Content-Type: application/atom+xml" + > vbcrlf > strXMLtosend=strXMLtosend + "" + vbcrlf > strXMLtosend=strXMLtosend + RawXML + vbcrlf > strXMLtosend=strXMLtosend + "--END_OF_PART" + vbcrlf > strXMLtosend=strXMLtosend + "Content-Type: image/jpeg" + vbcrlf > strXMLtosend=strXMLtosend + "" + vbcrlf > strXMLtosend=strXMLtosend + objStream.read + vbcrlf > strXMLtosend=strXMLtosend + "--END_OF_PART--" > > Set objXMLHTTP = Server.Createobject("MSXML2.ServerXMLHTTP.6.0") > objXMLHTTP.open "POST", webserviceurl,false > objXMLHTTP.setRequestHeader "Content-Type" ,"multipart/related; > boundary=""END_OF_PART"" " > objXMLHTTP.setRequestHeader "GData-Version", "2" > objXMLHTTP.setRequestHeader "Authorization", "GoogleLogin auth=" + > googleAuth > objXMLHTTP.setRequestHeader "Content-Length", 331343113121233112 > objXMLHTTP.setRequestHeader "MIME-version", "1.0" > objXMLHTTP.send strXMLtosend > > Type mismatch. at objStream.read in the strXMLtosend variable > > Doesn't like concatenating a binary stream with a string. Is it at all > possible to do this? > Converting binary stream to string removed type mismatch but gives "Not an > imagE" error. > > I can send the image to picasa fine, by itself not using multipart. But am > finding it impossible to send with metadata. > > Obi-internet-kenobi. help > > -- > You received this message because you are subscribed to the Google Groups > "Google Picasa Web Albums API" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/google-picasa-data-api/-/THS8iYfbEv4J. > > To post to this group, send email to > google-picasa-data-api@googlegroups.com. > To unsubscribe from this group, send email to > google-picasa-data-api+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/google-picasa-data-api?hl=en. > -- You received this message because you are subscribed to the Google Groups "Google Picasa Web Albums API" group. To post to this group, send email to google-picasa-data-api@googlegroups.com. To unsubscribe from this group, send email to google-picasa-data-api+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-picasa-data-api?hl=en.