Hi
question about Upload_Dir
for example can I changeĀ $col[“upload_dir”] = __DIR__.”/DATA”
to add an extra information coming from other field
example if field ‘Customer’ = 12 then upload dir
$col[“upload_dir”] = __DIR__.”/DATA/12”
I tried to create a specific field for Folder but I can’t user it
ex: $col[“upload_dir” = $data[“Folder”];
Maybe it’s not possible
Regards
Georges
1 Answers
You can do it with on_insert OR on_update event handler where you can move the uploaded file to the desired folder.
For sample code, refer to this code: https://www.gridphp.com/demo/demos/editing/file-upload.phps
Line 153-156: event handlers
Line 180: move the file to desired folder
Your Answer