compression

Upload core product.
Post Reply
ajassal
Posts: 11
Joined: Sun May 11, 2008 4:27 pm

compression

Post by ajassal »

#1 Is it possible to implement compression on the fly using zip /gzip streams (java.util.zip) rather than creating temporary files using the API?

#2 On the server how can I identify a file that was compressed by jfileupload versus a file that was skipped as it was in the ignore list? Basically I want to handle the case where a zip file is being uploaded as-is from the case where a .zip extension was added by jfileupload and I need to uncompress on the server.

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: compression

Post by support »

#1 is not available because we need to know the file size before upload. Such feature could be added anyway.

For #2, you could try:
<PARAM NAME="param6" VALUE="selectedfullfilename">
<PARAM NAME="value6" VALUE="true">
The applet should pass an additional parameter "selectedfullfilename" with the filename of the original selection.

Does it help ?

ajassal
Posts: 11
Joined: Sun May 11, 2008 4:27 pm

Re: compression

Post by ajassal »

Thanks. That worked out.

Another question I have around compression: is it possible to only compress files less than a certain size? The zipmaxsize parameter denies the request if it is above the threshold. What I would like is that for large files (several 100 MBs in size) we don't compress but send it as-is. This will then not consume local hard disk space for the zip version in the temp folder but allow the file to come through (albeit slower).

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: compression

Post by support »

I see but this is not available. I could add it to 2.1.

ajassal
Posts: 11
Joined: Sun May 11, 2008 4:27 pm

Re: compression

Post by ajassal »

Thank you.

Post Reply