I am using the Apache FileUpload library to allow a user to upload a .zip file to my webpage. The trouble is, the library seems to store the
files as items. To get around this I cast them as zip files and then used java.util.zipfile classes and methods. The program stores a .tmp file in the
directory but I can tell that it has not been decompressed because it is the same size as the compressed file. I would appreciate any help or insight any one
may provide on this issue. Thank you in advance.
The trouble is, the library seems to store the files as items.
I don't quite follow - are you saying that the uploaded files are not byte-for-byte identical with the original files?
I can tell that it has not been decompressed because it is the same size as the compressed file.
If you upload a ZIP file, why would it get decompressed? That's not what FileUpload does.
My class ZippedFile() takes in an 'item' (created by fileupload methods) and casts it as a 'zipfile'. In my method 'decompress' I attempt
to decompress the file. I don't think I was successful because it is byte-byte identical, meaning it was not decompressed.
Joined: Mar 22, 2005
Byte-for-byte identical seems unlikely - the output consist of multiple files, whereas the input is a single zip file, no?
If memory serves, it's possible to use ZIP as an archiver only, with no compression; make sure that's not what you have here.