Feature #98664
closed
Command for clearing processed files
Added by Julian Hofmann almost 2 years ago.
Updated 4 months ago.
Description
Maybe it would be nice to have the possibility of clearing processed files via commandline.
Background:
In a tweet by Jousch, he was asking whether someone uses his toolbar-based clearing of processed files (josefglatz/toolbar-clear-processedfiles) anymore. After some discussion why such a feature should not be available for editor and/or in production, the was the question if it would be useful as a command (and in the core)
my use cases so far (were the functionality would also be ok as command)¶
- You're changing from ImageMagick to GraphicsMagick for any reason or just for testing
- You're developing cache clearing features and you need a quick way to clear processed files before doing another testrun locally
- You're just lazy and don't want to open the system tools all the time
- You're experimenting with the GFX/jpeg_quality. And yes it totally makes sense to play with the value even if every photographer know that value 86 is somehow a good value between big file size and quality.
- Sprint Focus set to Needs Decision
- Related to Feature #45039: Scheduler task to clean up unused processed images added
- Status changed from New to Closed
I believe ./bin/typo3 cleanup:localprocessedfiles
is the command that could do that already?
If I misunderstood something here, please let me know and I can re-open the issue or discuss it!
Use-case and funcionallity would be another one.
./bin/typo3 cleanup:localprocessedfiles
The command will delete sys_file_processedfile records with references to non-existing files. Also, files in the configured temporary directory (typically processed) will be deleted if there are no references to them.
(https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.3/Feature-45039-CommandToCleanUpLocalProcessedFiles.html)
However, our use case would be that processed files are deleted independently of existing relations or (non-)existing original files. And that the database is also cleaned up in the process.
This can be helpful if something is changed in the image processing. E.g. (as Jousch described) switching from ImageMagick to GraphicsMagick, but also more creative scenarios such as a general switch to webp or similar, whereby all processed files are to be recreated.
- Status changed from Closed to Needs Feedback
Of course, I see - I actually misremembered. I once patched that command to do my bidding and thought it was part of the Core.
But I guess this command could be the base of such an addition, adding a parameter like "--reset" (that's what I used)...
Oh, I haven't seen that yet. Yes, from reading it, that should solve the problem.
Thanks for taking care of it (and solving it)!
- Status changed from Needs Feedback to Closed
- Sprint Focus deleted (
Needs Decision)
Thank you and sorry for me not properly "getting it" in first place. Hope it's ok to close the issue here now?
- Related to Task #102582: Command cleanup:localprocessedfiles should be able to cleanup all records added
Also available in: Atom
PDF