Ruby Oauth File upload/Multipart POST request

Posted by Jonas Söderström on Stack Overflow See other posts from Stack Overflow or by Jonas Söderström
Published on 2010-03-29T10:43:48Z Indexed on 2010/03/29 10:53 UTC
Read the original article Hit count: 411

Filed under:
|

Hi

I've been looking at this for a couple of hours now and haven't found a solution. Is there a way to upload a file using OAuth-Ruby?

When I send a normal request, everything works but adding a file as a parameter makes the signature invalid.

Example:

 @access_token.post("http://.../imageresource", {:name=>"awesome cat"})

works great but gives me:

 <error>
    <message>images/POST: Request has neither file data nor
    a fileUrl from which to download data</message>
 </error>

Any thoughts on this?

Thanks,

© Stack Overflow or respective owner

Related posts about oauth

Related posts about ruby