I'm guessing the crop tool developer figured it out. That's not one use case I have code for. If anyone has writing code, I'd love a link to it so I can get a demo posted.
There is a trick to getting the form type right, since OAuth's spec explicitly specified out doesn't work with multipart forms. I got it working at one point in or implementation, I'll see if I can dig up that code. On Mar 19, 2014 9:08 AM, "Magnus Manske" <magnusman...@googlemail.com> wrote: > OK, this is killing me. I'm trying to upload files to Commons (using > PHP/CURL). > > * I can upload local files with my own bot user. > * I can upload from remote URLs using OAuth, /if the user is an admin/ > > What I can't figure out is how to upload local files via OAuth. It's either > > "File upload param file is not a file upload; be sure to use > multipart/form-data for your POST and include a filename in the > Content-Disposition header." > > or (trying to add multipart/form-data to the header) > > "The authorization headers in your request are not valid: Invalid > signature" > > Is there any example code for uploading local files to Commons via OAuth? A > trick I can't find? Anything? > > Cheers, > Magnus > _______________________________________________ > Wikitech-l mailing list > Wikitech-l@lists.wikimedia.org > https://lists.wikimedia.org/mailman/listinfo/wikitech-l _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l