Hi,
is there any way you can get a browser to compress a file before uploading it?
ie from an <input type="file">
Thanks, Jamie
Hi,
is there any way you can get a browser to compress a file before uploading it?
ie from an <input type="file">
Thanks, Jamie
Not using pure HTTP. You could do it using silverlight or flash, though.
Without using Flash, Java, Silverlight, or similar plug-ins, the browser doesn't compress the files it uploads. It's the server that can send compressed data, if it has been set to do so.
To give a complete answer, I should say there are implementations of GZip made in JavaScript; considering that it is made natively in JavaScript, it is not a practical solution, which should be considered only in particular cases.
While you can't compress the file before transfer. If the most important thing is that it resides on your server compressed, and is later downloaded compressed. You can easily set up some server side code to do the work after the file is received. As a redundant note, this will do nothing to improve upload speed, as the file is uploaded uncompressed, and then compressed server side.