How can I deliver an image as an attachment?

Cloudinary supports delivering uploaded images as attachments using their original file names.

You can use the flags transformation parameter to attachment, or add fl_attachment to transformation URLs.

The original file name of all newly uploaded images is now stored on our side for this purpose (for previously uploaded images the public ID would be used).
You can set the flags transformation parameter to attachment, or add fl_attachment to transformation URLs.

Here's a sample uploaded image delivered inline:

http://res.cloudinary.com/demo/image/upload/v1362144095/sample_attachment.jpg

Same uploaded image with the attachment flag, downloaded as the original file name ('Custom File Name'):

http://res.cloudinary.com/demo/image/upload/fl_attachment/v1362144095/sample_attachment.jpg

When using our Ruby GEM, simply add :flags => :attachment when building transformation URLs of uploaded images.

Have more questions? Submit a request

Comments

Powered by Zendesk