Actually there's an option to automatically unzip uploaded files, I'd like the opposite: automatically zip uploaded files.
Goal is to save disk usage. In my project, admin users will upload thousands of text files for the next years, some files can have a size up to 20-30 MB. Compressing this text files will reduce total size by a good ratio.
Field option => add option to activate auto-zip.
File upload, after uploading and saving page => compress to zip automatically and delete original file.
If possible, when file has just been uploaded but page not saved, give access to original file before to delete it, so we can read it in a saveReady hook, avoiding a zip/unzip process at this time.
Loading page in admin => don't unzip, just display file name like actually. If we click the file, download zip.
API => Ability to unzip and get original file. Dunno what is the best, adding method to unzip or automatic unzip when accessing page->fieldName?
When request is finished, delete unzipped file.
I know zip/unzip will take more CPU resources but that's a compromise against disk usage.
Short description of the enhancement
Actually there's an option to automatically unzip uploaded files, I'd like the opposite: automatically zip uploaded files.
Goal is to save disk usage. In my project, admin users will upload thousands of text files for the next years, some files can have a size up to 20-30 MB. Compressing this text files will reduce total size by a good ratio.
I know zip/unzip will take more CPU resources but that's a compromise against disk usage.