Eager transformations in signed uploads
I am trying to get cloudinary to accept the eager transformations for signed uploads. I am definitely receiving them in my backend where the signature is created but am receiving an error when trying to upload with cloudinary saying the parameters that should be signed doesn't include 'eager'.
Is the SDK i am using (rails) not work with some parameters or do I need to change something on my upload preset to allow this to happen?
-
Hi Nico,
You should be able to apply eager transformations using the Ruby SDK. As mentioned here, a signed upload requires either a backend SDK that will automatically sign the request, or to sign it manually
Do you mind sharing your cloud name so I can take a deeper look?
Thanks in advance.
Best,
Loic
0 -
cloud name is - goatagency
I am using the ruby sdk and have been able to sign uploads without a problem, but as soon as I wanted to use 'eager' the uploads wouldn't work
Code below.
def generate_signature
render(json:Cloudinary::Utils.api_sign_request(JSON.parse(params[:params_to_sign]), ENV['CLOUDINARY_SECRET']))
end0 -
Is there anyone who can help with this?
0 -
Hi Nico,
Do you mind sharing the content of your `param_to_sign`?
From our logs, here is the error:
```Invalid Signature 62147df615941a7ddc84eb57735f2571bfd5dfdb. String to sign - 'source=uw×tamp=1643388395&unique_filename=false&upload_preset=goatagency1&use_filename=false'.
```
Thanks in advance.
Loic
0 -
Hi Loic,
The params to sign
"params_to_sign"=>"{\"eager\":\"w_400,h_300,c_pad|w_260,h_200,c_crop\",\"source\":\"uw\",\"timestamp\":1644512578,\"unique_filename\":true,\"upload_preset\":\"goatagency1\",\"use_filename\":true}"}
0 -
Hi Nico,
For some reason, there are differences in your request.
The string to sign error message is saying that we only got these parameters `source=uw×tamp=1643388395&unique_filename=false&upload_preset=goatagency1&use_filename=false` but your params to sign is being passed different parameters.
Are you building the params_to_sign?
Regards,
Daniel0 -
This is why I am asking. It appears that after signing these params, the 'eager' part is not being received by cloudinary. All the other params work fine and as soon as I remove the 'eager' param, uploading is fine.
0 -
i am using the js method 'createUploadWidget' - so where do I pass in eager for this to be properly recognised.
I was using 'prepareUploadParams' where i would then get the params signed but it appears from the docs that 'eager' is not accepted in this method.0 -
@Nico,
Do you want to open an internal ticket so you can send over details about how you have the upload widget code set up? https://support.cloudinary.com/hc/en-us/requests/new
Regards,
Daniel0
Post is closed for comments.
Comments
9 comments