How can I update the filename on upload to something meaningful?

Currently, when image files are uploaded, the original filename, eg IMG_0646, or whatever name the user had set, is what appears in the list of uploaded files. Can I rename this to something meaningful, eg user-avatar-iso-datetime.ext. ? If not, it seems my list of uploaded files will become a giant mess.

Or, alternately, can I at least add some corresponding metadata to the file?
I see info about adding metadata in a REST payload but nothing for how to do it usiing the blocks file uploader.

Thanks for any insights!

Hello Anders.

We don’t have an option to change the filename for an uploaded file. The intended way to use is wnen downloading the file, you can add the filename to the URL so it would look like: https://ucarecdn.com/cd25a4e8-18ff-442d-a98c-86b01a50005b/avatar.png. The file will be uploaded with the filename “avatar.png”.

You can add metadata, however, and it’s fairly simple to do with the blocks. Here’s an example of how to add metadata to your uploader: https://codesandbox.io/p/sandbox/metadata-example-mkgfgd

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.