is there any way you can get a browser to compress a file before uploading it?
ie from an <input type="file">
Thanks, Jamie
If you're on a PC using Windows, right-click the folder and in the menu that appears you should select Send to and then under that menu select Compressed (zipped) folder.
HTML compression, meanwhile, shrinks file size by replacing redundant code instances with references attached to the original information that indicate the position of this duplicated data. Called “lossless compression”, this technique ensures just that: No data loss when file sizes are reduced.
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, and should be considered only in particular cases.
Not using pure HTTP. You could do it using silverlight or flash, though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With