How to convert public delivery types to authenticated delivery type for existing media ?
We have around 2000+ items with public delivery type and we want to change it to authenticated delivery type for the security purpose.
Can you suggest a way to migrate from public delivery type to authenticated delivery type?
-
Hi,
Thanks for reaching out.
There are two options to make the asset authenticated:
1. You can use the Rename method of the Upload API to change the delivery type of an asset. You can put the same value on the parametersto_public_id
andfrom_public_id
, then addto_type: authenticated
.
Please check the documentation for more information: https://cloudinary.com/documentation/image_upload_api_reference#renamePlease note that the URL will change and you'll need to use a different URL. for example:
https://res.cloudinary.com/<your_cloud_name>/image/authenticated/s--Auth--/v1590711766/<public_id>.jpg2. If you have a private CDN you use token authentication - First you'll need to update the resources:
cloudinary.v2.api.update("sample",
{
access_control: [{ access_type: 'token' }]
},
function(error, result) {console.log(result, error)}
);Then to access them, you will need to use your key:
cloudinary.image("sample",{type:"authenticated",auth_token:{key:"<your key>",duration:300},sign_url:true})
Best regards,
Tamara0
Post is closed for comments.
Comments
1 comment