well.. we can do that ... u code it - i give u the logic
if $crud->getState() == 'add'
- set the upload path to regular / normal wherever u have it.
u can have a callback_upload or callback_after_upload ... whichever suites you.. to move the uploaded file to the set location.
But - 1 thing - make sure you disable the upload / hide the upload (whatever suites) till the category / product is selected. Post the selection of both - enable the same.
Now - other important stuff..
if $crud->getState() == 'edit'
- Retrieve the primary key for which the record is getting edited (either from the url or from the getStateInfo() function)
- Retrieve the row .. and get the selected category / product.... (based on the ids of respected selected and stored in the table)
- Now set the uplod path to upload/<category_name>/<product_name>
this will allow the user to directly manage the file set location.
Hope you can now crack a deal on the same :)
Happy GCing :)