Hello, I’m using$col["upload_dir"] = "temp";
to define where uploaded files should be stored.
However, what I need is for the file to be saved inside a dynamic subfolder, which should be created automatically if it doesn’t exist.
This subfolder should be named after the document number of the current record (for example: temp/12345678/).
How can I use a variable like $numeroDocumento inside upload_dir so that each file is saved in its corresponding folder?
1 Answers
You can use on_insert or on_update event handler and relocate the file from the base location inside the on insert process.
You can refer to the code: https://www.gridphp.com/demo/demos/editing/file-upload.phps
line 153-155 and 162-182
Your Answer

