On Wed, Mar 19, 2014 at 12:07 PM, Magnus Manske <[email protected]
> wrote:

> Is there any example code for uploading local files to Commons via OAuth?
> A trick I can't find? Anything?
>

The trick is that you only include the POST data in the signature when the
content-type is application/x-www-form-urlencoded. Uploads require
multipart/form-data, so you don't include any of the posted fields when
calculating the signature (i.e. pretend it's an empty POST when signing).


-- 
Brad Jorsch (Anomie)
Software Engineer
Wikimedia Foundation
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to