The enclosed file, JUpload_5.0.0rc4_FileZip.patch, updates the 5.0.0rc4 JUpload version to include a Zip2uploadPolicy which uploads all added files as a single zip file. For compatibility with Windows' file system during unzipping, non-windows' file names are altered when necessary.
"maxUploadSize": specify the maximum total bytes for all uploaded files prior to compression into a zip file.
"uploadName": name of uploaded zip file.
The patch file also includes three new files.
1) policies/Zip2uploadPolicy.java: this contains the new class to implement the zip policy.
2) upload/FileZipper.java:
This file performs the actual zipping and compression and fully maintains the tree of files, and alters file path characters which are not suitable for the windows' file system
3) gui/filepanel/zipDummyFilePanel.java: Provides bookkeeping of files within panel as preparation for zipping.
ALLOW_FORBIDDEN_EXTENSION_ALERT: this value (always set true for other policies) causes warnings when forbidden file extensions are within the included file list. For the zip policy, warnings are turned off.
240 Character Relative Path:
The new zipping mechanism enforces a limit of 240 characters for a file path length, beginning with the common uppermost file node. Windows has a limit of 260, so why 240? We need a few extra characters for the disk and file path where the files are unzipped.
Issue on Windows' Compatibility:
Altering file names might cause, in rare cases, some folder names to become equal. However, if unzipped on a window system, the resulting hierarchy will be compatible with the windows' file system.
Byte Counter Bug:
The program keeps a counter of the number of file bytes, before zip compression, to avoid exceeding a new limit on raw file sizes. However, this counter is not decremented when the user manually removes files from the list of files for uploading; therefore, the user is unfairly prevented from adding more files.
Regards
Michael Everest
Research Engineer
SAFE Corp
Anonymous
Patch file update from JUpload 5.0.0rc4
Hi,
Thanks for this patch !
I'm fighting with other points these days. I'll check this ASAP.
Regards
Etienne