Create public ID and/or file name from metadata
Hello,
We are entirely new to Cloudinary so forgive me if this is an unintelligent or redundant question: Is it technically possible to code a script that
1. allows for the bulk upload of assets into a temporary folder
2. (user then manually assigns structured metadata)
3. automatically starts rename files according to the structured metadata ("metadata1-metadata2-metadata3.jpeg") once all metadata has been assigned
4. creates a public ID from the metadata ("metadata1-[random number]")
5. moves the assets from the temporary folder to the final folder "metadata1".
Thanks for a hint, I do appreciate your time!
-
Official comment
Hey, thanks for getting in touch. I'm Danny and I'm one of the Developer Support Engineers here at Cloudinary.
It sounds like the best thing here would be to use a global notification URL which sends a JSON payload to a given URL whenever something is changed. You'd set up something on your side to receive these payloads and then take action on them. In this case, it seems like you'd want to listen to
"notification_type": "resource_metadata_changed"
and then take the asset ID of the asset that was changed, invoke the Upload API to rename the asset to what is in the metadata, and move it at the same time.You can see an example of what the payload would be for a metadata update here.
I hope this helps. Please feel free to reply here if you have any further questions, or raise a ticket via our support center if you'd prefer.
Thanks,
-Danny -
Danny, I very much appreciate your reply. We are not familiar enough with the technical ins and outs to do what you suggested ourselves. I take it that the process that I described is technically feasible and if this is the case, we'll look for an external expert who has the expertise to code such a script. The links and hints that you included in your reply are very helpful!
Thank you!0 -
Hello again 👋
What you've described above is definitely feasible! While we don't have development partners or any freelance Cloudinary experts that we recommend, it should be a fairly straightforward task for someone who has familiarity with receiving webhooks. Should you and/or your developer need any assistance in getting this up and running though, please don't hesitate to raise a support ticket with us and we can go over specifics regarding your account and setup
Thanks,
-Danny0 -
Great, thanks so much. We are already in touch with some prospective developers and will be glad to ask for your help, should we need to. Cheers!
0
Post is closed for comments.
Comments
4 comments