js-url-gen
js-url-gen copied to clipboard
Question / Feature Request
I was wondering if there was a way to show an image preview of my file saved on Cloudinary. It might be made available for specific document types e.g. .pdf, images, .docx, etc. If this doesn't already exist, I hope it can be added to Cloudinary as this would make the package even more awesome.
How are you uploading the files? Do you use our upload widget? You can enable crop mode in the widget so you will get a preview of the document before uploading, you can see an example here (click the Crop and upload button).
No, I'm uploading the files manually using the NodeJS SDK. And I need the preview image in other places other than when I'm uploading. It would be cool if there could be a link like https://cloudinary-file-path/preview that contains the preview image of that file.
I see, currently this is not something we support, as a workaround, you can upload the file using the NodeJS SDK as you're currently doing, and create a transformation URL to generate a preview of the uploaded file. This transformation URL will contain the necessary parameters to create a smaller or differently formatted version of the original image. For example:
https://res.cloudinary.com/your-cloud-name/image/upload/c_scale,w_200/sample.jpg
Then delete the image.
Please also feel free to suggest this on our public roadmap!
A transformation URL? I'll check out the docs to know more about it and get back to you in case I need further assistance. Thanks 🙂