How to rename public id?
AnsweredIs there a way to rename a public_id after creation? I need this for direct image uploads which are assigned via the random key in the cloudinary_gem
-
Indeed renaming a public_id after it's creation is supported.
There is a rename method in each of the client libraries
0 -
I don't use the library. What about renaming after the upload through the interface on https://cloudinary.com/console/media_library ?
0 -
You can do it via the console by re-uploading the image using the new public_id, and deleting the old one.
It is in our road-map to add the ability to rename from the media library
0 -
Any update on when this might be possible via the console? Deleting and reuploading doesn't work well when transformations are cached and won't go away.
0 -
+100 This really needs to be in the dashboard.
0 -
Hi Teresa and Glenn, thank you for your responses.
Renaming via the Media library is still on our road-map and should be added in the near future.
We will update here when this is available.Note that deleting and re-uploading an image also invalidates cached copies in the CDN. It might take up to one hour for the invalidation to fully propagate.
0 -
UPDATE
Renaming can be done now interactively via the Media Library.
This can be done by choosing the required image and click on Rename.0 -
WHOOHOO!!!! Thank you so very very much!!!!
0 -
Any handy tool or script out there to rename to remove the tailing random id that was added during upload?
0 -
See my project: https://github.com/nadirlc/Public-API-Functions. It removes the random text that is automatically added to the uploaded files.
0 -
Diego, We don't possess such a script, but this can be easily done using a combination of Admin-API instructions for listing your resources, and the rename method for chopping off the random suffix.
If you require assistance, feel free to open a ticket at:
http://support.cloudinary.com/tickets/new0 -
By the way, you can prevent Cloudinary from adding random characters to the
public_id
during the upload.
More information in the following link:
http://support.cloudinary.com/hc/en-us/articles/202520812-Why-does-the-public-ID-include-additional-characters-appended-to-the-original-file-name-0 -
I am currently looking at this page: http://cloudinary.com/documentation/admin_api#update_resources and cannot find the rename method mentioned in the comments.
I would greatly appreciate this method so I can write a script to rename our 50,000 ish images.
0 -
The `rename` API's documentation can be found here:
http://cloudinary.com/documentation/image_upload_api_reference#renameAlso, it's documented under our specific frameworks' documentation, e.g., Python/Django:
http://cloudinary.com/documentation/django_image_upload#rename_images0 -
Thank you!
0
Post is closed for comments.
Comments
15 comments