I am trying as a straight filter ... all ok except ... how do I ascertain the fieldName for the upload that is being processed?
DefaultUploadStorageStrategy::storeMainFile() has $fieldSchema so the call to _saveUpload_chooseUniqueNumberedFilename() needs to add it and the hook call also needs to add it ... that should not cause any old hook issues.
Is this possible ... as my check is for tableName == 'blog'and fieldname == 'gallery' (as an example)
Thanks!
What I am about to try changed upload_functions.php line 295
// move main upload to long-term storage
$GLOBALS['fieldname'] = $fieldname;
upload_storage_strategy()->storeMainFile($mainUploadWorkingPath, $uploadInfo['name'], $fieldSchema, $uploadRecordDetails);
unset($GLOBALS['fieldname']);
OK that works for saving the filePath but the change is NOT made to the urlPath the base name is there so all of the file links fail ;-)
---
Peace and Long Life