Changing file name for private download url
Hello. I'm using the 'private_download_url' function with node.js sdk like this:
const downloadUrl = await cloudinary.v2.utils.private_download_url(
'public_Id','format',{expires_at:someNumber,attachment:true});
that's works fine, but all the downloaded files get the name file.[format] ,
There is any chance to change the downloaded file name?
Thanks!
0
-
@gilad
Private download url downloads that assset with that particular name and cannot be customized. If you wish to change it, you can instead use the `flags` parameter and set it to `attachment:<new_name>` (`fl_attachment:<new_name>` in URLs).
E.g.
http://res.cloudinary.com/demo/image/upload/fl_attachment:new_sample/v1362144095/sample_attachment.jpg
More details covered here:
https://support.cloudinary.com/hc/en-us/articles/202521252-How-can-I-deliver-an-image-as-an-attachment-0
Post is closed for comments.
Comments
1 comment