What HTML5/Javascript method I can use to upload and compress files on the client side?
The code to select multiple files:
Note: If you upload files occupying this method, the server is slow to compress files, to prevent overloading is preferable to compress from the client side
<form method="post" enctype="multipart/form-data">
<input type="file" name="fileselect[]" multiple="multiple">
<input type="submit">
</form>
The code as I'd like it to be:
<script>
...
</script>
...
<form method="post" enctype="multipart/form-data">
<input style="display:none" type="file" name="singlezipfile">
<input type="submit">
</form>
thanks in advance
There is no built-in functionality to achieve this...
But you can do this using FileReader API and javascript zip implementation like this one http://stuk.github.io/jszip/
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