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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-picasa-data-api?hl=en.

Reply via email to