Hey everyone! 👋

I recently ran into a frustrating issue while working on a project that uses Cloudinary to manage media files. Everything was smooth while uploading images, but when I tried to upload and download PDF files, I kept getting an error when accessing the download URL.

The PDF appeared in the Media Library, but the URL returned an error. No matter what I tried, it wouldn’t work.

It took me quite a while to figure out what was going on, and I want to share the solution with you so you don’t waste time like I did.

❓ What’s the Problem?
Cloudinary does not deliver raw files like PDF or ZIP by default. Even if the upload is successful and you see the file in your Cloudinary dashboard, the download URL won’t work unless you take a specific step.

✅ The Solution

  1. Log in to your Cloudinary account.
  2. Go to Settings > Security.
  3. Scroll down to the section “PDF and ZIP files delivery”.
  4. Check the box labeled “Allow delivery of PDF and ZIP files”.
  5. Click Save.
  6. Accept the Terms of Service if prompted.

🔗 Official Cloudinary Support Article
Cloudinary has a detailed explanation here: 👉 Why are PDF or ZIP files appearing in the Media Library but their download URLs returning an error?

🚀 Final Thoughts
If you’re working with Cloudinary and plan to allow file downloads (not just images/videos), don’t forget to enable raw file delivery. It's a simple setting but can cause a lot of confusion if you’re not aware of it.

Hope this post saves someone a few hours of debugging! If you’ve run into similar issues or have tips, drop them in the comments! 👇