Downloading a pdf file
Hi.
I'm trying to create a downloadable link from a uploaded pdf file but struggling.
If the original url is https://res.cloudinary.com/<db id> /image/upload/v1688608254/<folder name>/example.pdf
shouldn't the download link be https://res.cloudinary.com/<db id>/image/upload/fl_attachment/v1688608254/<folder name>/example.pdf ?
Please correct me for my wrong doings.
Thank you.
Best Answer
-
Hi @ryan202 ,
Thanks for reaching out.
That is the correct format but you need to enable PDF/Zip delivery from Security -> Settings. Scroll all the way down and there is a check box called PDF and ZIP files delivery. Once enabled, your link should work.
Also note, if you have strict transformations (https://cloudinary.com/documentation/control_access_to_media#strict_transformations) enabled then only transformations pre-generated securely OR accessed via a signed URL will work OR if you explicitly allow this transformation for strict. This does not seem to be your issue but just mentioning for future use-cases.
Please let me know if you have any other questions or queries.
Kind Regards,
Thomas
1