javascript - compressing image in client side in codeigniter -
<div class="container"> <div class="row"> <form action="<?php echo base_url();?>product-compress" method="post" enctype="multipart/form-data" onsubmit="return handlefiles()" > <input type="file" name="images" value="" id="imagefile" class="btn btn-default"> <input type="submit" name="submit" value="submit" class="btn btn-default"> <input type="hidden" id="my_hidden" name="my_hidden" value=""> </form> </div> </div> <img src="" id="image"> <script> function handlefiles() { var filestoupload = document.getelementbyid("imagefile").files; var file = filestoupload[0]; // create image var img = docume...