How can I make a public asset private?
I have some images hosted and I want to update the asset-type for all of them to be "private" instead of "upload", to make use of the privacy features. Unfortunately I can't find any info on that and I have searched for quite some time now ...
Those are the things I tried:
1) Management console: It just shows the type, but it's not possible to change the type there.
2) NodeJS SDK, using api.update("publicId", { type: "private" }) - does not work. Apparently it uses the type parameter here to query and not to update the field, which results in a 404 not found ...
3) NodeJS SDK, using api.update_resources_access_mode_by_ids('private', ["publicId"]) - Error: "Cannot update access_mode because this feature is not enabled."
Is this even possible with Cloudinary or do I have to re-upload all of those images?
-
Hi Christian,
You can change the `type` of the image by using the `rename` method, eg.
uploader.rename(public_id, public_id, {type: "private", to_type: "upload"}, cb)
Let me know if this works?
0 -
Is there anyway to do this in the web gui?
We're using Cloudinary as a DAM where content creators upload images mainly via the web GUI.
0 -
Hi,
You can set the access control in the media library as described here: https://cloudinary.com/documentation/dam_manage_individual_assets#setting_access_control_from_the_media_library
Please note that this option is available to our custom plans.
0
Post is closed for comments.
Comments
3 comments