Hi, Sarvesh! I recently found that to successfully upload a photo you need 
to send a multipart request, but the JSON part of the request must go in the 
URL. So instead of:

--part type:application/json --
{ method: 'mediaitems.create', ... }
--part type:object/octet-stream --
[BLOB]

You move the request to the URL:

/social/rpc?request=URLEncode("{method: 'mediaitems.create', ... }")

This is how our client library does it:
http://www.google.com/codesearch/p?hl=en#FfgKrVcptGg/java/src/com/google/orkut/client/api/BatchTransaction.java&q=upload%20addBody%20package:http://orkut-os-client%5C.googlecode%5C.com&l=118

I've been scratching my head too. I imagine that our photo upload 
implementation predates the OpenSocial spec, and came at a time when Shindig 
didn't have multipart processing. But that's a conjecture, I was not there 
at the time.

-- 
You received this message because you are subscribed to the Google Groups 
"orkut Developer Forum" group.
To post to this group, send email to opensocial-orkut@googlegroups.com.
To unsubscribe from this group, send email to 
opensocial-orkut+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/opensocial-orkut?hl=en.

Reply via email to