Bug #81907
closed
LocalDriver should call signals when a file was renamed, overwritten or just added
Added by Timo Pfeffer over 7 years ago.
Updated about 7 years ago.
Description
Currently the RessourceStorageInterface has a mass of defined signals.
If someone is using the Filelist to upload a file, then these signals are mostly ignored. Only the postAddFile and preAddFile are called, although the original file was replaced or the new one renamed.
Please make sure that the signals of the RessourceStorageInterface are correctly thrown and are implemented on all possible positions.
In the case of Filelist uploading the process is always calling RessourceStorage->addFile. This one triggers preFileAdd an postFileAdd Signals and calls LocalDriver->addFile, which doesn't trigger any signal of RessourceStorageInterface.
- Status changed from New to Needs Feedback
The localDriver doesn't call any signals.
Only the storage call's signals. This is a the whole idea of the FAL, it doesn't matter what driver is registered all handling is the same.
Not sure what signals you are missing now but as far as my experience is is that all methods of the resourceStorage is correctly covered by signals.
Here an example extensions that uses these to process all files handed to the API https://typo3.org/extensions/repository/view/image_autoresize
If you are using the FileList Module then the upload process only triggers the addFile Signals doesn't matter whether just uploading a new File (then it would be correct) or replacing an existing file (then the preFileReplace and postFileReplace Signals must be triggered instead of addFile). If you are saying that the LocalDriver shouldn't trigger any of the RessourceStorageInterface Signals then it would be OK for me, but then the RessourceStorage must trigger the FileReplace Signals before entering the LocalDriver (addFile Function) if the target file will be replaced.
- TYPO3 Version changed from 8 to 6.2
shit ... I didn't saw that my expected behaviour exists since 7. So it does not exist in <= 6.x . Is it possible to implement it on the same way in 6.2 ?
The changes will not be backported as support for 6.2 has ended. Easiest would be to update to 7.6 or 8.7 I guess.
Maybe you can be creative with current signals but not sure.
- Status changed from Needs Feedback to Closed
As stated on the previous comment, no backport will be performed for version 6.2; I'm closing this for now.
If you think that this is the wrong decision or experience the issue on recent TYPO3 versions like 7.6.x or 8.7.x please reopen it or open a new issue with a reference to this one. Thank you.
Also available in: Atom
PDF