Unable to use the format when uploading an image
I am trying to upload images to cloudinary using the format argument. i want to force the conversion of all uploaded material to a .jpg ( for example if upload a .pdf i want it to be uploaded as .jpg) I am getting the error below
code:
-
Hi Abdel,
This error is returned if the signature Cloudinary calculates on our backend based on your Upload parameters doesn't match the signature you provided as part of your request.
To understand why that is, may I please ask you to share how (code snippet) you are generating the signature as part of your request? If you would like to share that privately with us then you can open a support ticket through - https://support.cloudinary.com/hc/en-us/requests/new
-
Thanks for sharing that.
This happens because if you want to pass additional upload parameters they need to be part of the parameters you use to generate the signature. In your current code, you only have the timestamp, so if you pass additional upload( ) parameters, such as 'format', you need to pass them in the api_sign_request( ) call as well.
May I please ask you to pass the 'format' with the value 'jpg' in your api_sign_request( ) call and then retry the uploads again? That will ensure your signature is calculated correctly to match the parameters you will send to Cloudinary.
Please sign in to leave a comment.
Comments
6 comments