Actually the file upload process in any jcook-generated component is:
- User save the item
- controller calls the model to save item
- Item saved. Controller (postSaveHook) calls again the model to save the files evenually uploaded with the item
- The model(_upload) does the tasks needed on the file and THEN eventually SAVE the new filename into the ITEM
if we have 1 file to upload, this process will require 2 SAVE processes (1 to save the item, 1 to save the filename).
It's still acceptable, but if we have for example 6 files to upload and maybe many users at the same time, this process is not convenient at all.
I would move the upload process BEFORE the Item save process, so I can update the filenames and save any modifications in one call.