I'm looking for ways to rename a file from a form, ideally early or locally in the browser, before interacting with the server
Is this possible? Maybe it would be a good option for the future, I can think of several applications for this (in my particular case it's to prevent a watermark from being applied to certain specific files)
I think I was able to solve it, in my particular case I use WordPress Media Library. I show disconnected users another form (I've mentioned this in other tickets, I think it's very painful to force the user to upload one file at a time, I really think you guys should review this in the future, plus Toolset's promise is to be a plugin with little code and user-friendly)
But getting back to the topic of the ticket, since I'm using Media Library I can modify this via php on the server, it's something like this:
With this I'm fine, I've achieved what I was looking for, although there may be a more global solution via JS, so that the file that the server works with and stores already has the prefix or name modified
Hello. Thank you for contacting the Toolset support.
No - there is no custom JS workaround available that I should share and as your are using media uploader it's better to use the hook to change the file name on fly.