How to set text overlay via POST request?
I have set up an unsigned upload which overlays a predefined image over the uploaded image (successfully), but I now need to add a text caption to the image on upload (the text is a string fetched from another API), but I cannot figure out how to do this.
The workflow should be:
- User uploads image (in fact via photo from device camera)
- Caption is fetched from external API as a string
- Image is sent to cloudinary
- Image is returned with overlays (image mask and caption) in place
- User can download the image
The code so far can be found here (React btw.): https://gist.github.com/sschuchlenz/f6efc8d6646f51d406801c18c9aec90f
Any help greatly appreciated!
-
Hi,
As unsigned uploads can be easily manipulated by your end users, including to ones you may not approve, unsigned uploads are restricted to honor only specific parameters (https://cloudinary.com/documentation/image_upload_api_reference#unsigned_upload_parameters). Applying dynamic transformations is one of the disallowed parameters.
The options to apply transformations dynamically would be to either sign the upload request, and then you'll be able to apply an incoming transformation, or to upload the original image as is, and then apply the transformation as a derived image after the upload is done.
I hope this helps.
0
Post is closed for comments.
Comments
1 comment