Re: [Wikitech-l] OAuth upload

2014-03-21 Thread Cristian Consonni
2014-03-19 20:34 GMT+01:00 Cristian Consonni : > Eventually I found that in my case the source for the error was the > econding of title, since I was doing it (erroneously) two times, so > that, for example: > > Teatro_comunale_(Bolzano) -> Teatro_comunale_%28Bolzano%29 > ->Teatro_comunale_%2528Bol

Re: [Wikitech-l] OAuth upload

2014-03-20 Thread Magnus Manske
YES! THANK YOU! The removal of http_build_query was the missing, secret ingredient. All is well now in my OAuth world! Thanks again, Magnus On Thu, Mar 20, 2014 at 2:05 PM, Brad Jorsch (Anomie) wrote: > On Wed, Mar 19, 2014 at 3:20 PM, Magnus Manske > wrote: > > > Hi Brad, > > > > I'm sure th

Re: [Wikitech-l] OAuth upload

2014-03-20 Thread Brad Jorsch (Anomie)
On Wed, Mar 19, 2014 at 3:20 PM, Magnus Manske wrote: > Hi Brad, > > I'm sure that's correct, but: > > * When I just sign the OAuth params (no content type, no POST fields), I > get "The authorization headers in your request are not valid: Invalid > signature" > * When I then add the content-type

Re: [Wikitech-l] OAuth upload

2014-03-19 Thread Cristian Consonni
2014-03-19 20:20 GMT+01:00 Magnus Manske : > Hi Brad, > > I'm sure that's correct, but: > > * When I just sign the OAuth params (no content type, no POST fields), I > get "The authorization headers in your request are not valid: Invalid > signature" > * When I then add the content-type to the heade

Re: [Wikitech-l] OAuth upload

2014-03-19 Thread Magnus Manske
Hi Brad, I'm sure that's correct, but: * When I just sign the OAuth params (no content type, no POST fields), I get "The authorization headers in your request are not valid: Invalid signature" * When I then add the content-type to the header, I get ... the API help page, wrapped in the XML tag

Re: [Wikitech-l] OAuth upload

2014-03-19 Thread Chris Steipp
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

Re: [Wikitech-l] OAuth upload

2014-03-19 Thread Brad Jorsch (Anomie)
On Wed, Mar 19, 2014 at 12:07 PM, Magnus Manske 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. Upl

[Wikitech-l] OAuth upload

2014-03-19 Thread Magnus Manske
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 f