Skip to main content

Eager transformations in signed uploads

Comments

9 comments

  • Loic Verger Del Bove

    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
  • Nico Cary

    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']))

    end
    0
  • Nico Cary

    Is there anyone who can help with this?

    0
  • Loic Verger Del Bove

    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&timestamp=1643388395&unique_filename=false&upload_preset=goatagency1&use_filename=false'.

    ```

    Thanks in advance.

    Loic

    0
  • Nico Cary

    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
  • Daniel Mendoza

    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&timestamp=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,
    Daniel

    0
  • Nico Cary

    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
  • Nico Cary

    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
  • Daniel Mendoza

    @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,
    Daniel

    0

Post is closed for comments.