cloudinary icon indicating copy to clipboard operation
cloudinary copied to clipboard

Uploading with certain parameters causes Invalid Signature error

Open TwiceII opened this issue 10 years ago • 5 comments

First of all, thanks for the great package!

Issue I'm facing is: when I include optional parameters (as described in http://cloudinary.com/documentation/upload_images#remote_upload) in my upload, sometimes I get "Invalid Signature xxx. String to sign yyy" error. Some parameters seem to "break" signature, like when I include eager:

Cloudinary.upload(files, {
    folder:"temp",
    format: 'png',
    eager: "c_fill,w_260,h_216"
}, function (err, res) {
...
});

while passing only folder, format parameters works just fine.

TwiceII avatar Aug 06 '15 06:08 TwiceII

You are welcome ^^ I haven't tested for that, I'll see what I can do as soon as I get a chance but I do know that the way I'm signing is probably not the best way to do it. If you are willing to give the package a stab, check Cloudinary's NPM package and try to trace how they are signing the request. They put a lot of bullshit around their code so it might take a bit of time to understand. If you do find out the issue before I get a chance to, please feel free to post a merge request. I'll probably have some time to take a look at the end of the month ><

Lepozepo avatar Aug 06 '15 06:08 Lepozepo

Ok then, I'll inform if I get any insights on that.

TwiceII avatar Aug 06 '15 07:08 TwiceII

Just wanted to pipe in on this as I am running into the same error. I was reading this document which says that only certain params need to be signed. From the looks of the code it appears that it is currently signing all parameters. My guess is that if we filter the parameters object and only sign these params: callback, eager, format, public_id, tags, timestamp, transformation, type it could work.

a-mummey avatar Sep 01 '15 21:09 a-mummey

I just repaired this, I'll drop it in the next iteration

Lepozepo avatar Nov 06 '15 07:11 Lepozepo

when i try to upload image with direct call to api it gives me this error plz help Failed to load resource: the server responded with a status of 400 (Bad Request) cldd cloudd

sanidhyasharma avatar Mar 02 '17 14:03 sanidhyasharma