Hello,
I need to rename the file name in multiupload fields.
How can I do this?
Hello,
I need to rename the file name in multiupload fields.
How can I do this?
Had a look at this. There is no direct event or ajax event that you would be able to do this. (unless you maybe want to give JS a try)
The route I would go is:
Assuming you are using the multi upload on a form, you will have a mulitiupload table that has a foreign key to your primary table.
OnAfterInsert (or other equivalent event)
Do sc_commit_trans to commit your transaction. Ensuring the primary table record is available in the db.
(The primary key of your primary table will be available through the normal {} notation.)
The do a normal database update on your multiupload table based on the foreign key filter.
Rename your files in the db and on your file storage accordingly.
** this is applicable if you are using multiupload but not storing the files in the db. If you are storing it in the db, then just do the filename rename in the db…