Link to home
Start Free TrialLog in
Avatar of wael_shehab
wael_shehabFlag for Saudi Arabia

asked on

How to make browsers to compress large form posts before sending them to the server

Dear All,
Is There any way to compress large form posts  in client side (in java script )before sending them to the server i have already used  
rawdeflate.js
   var filesSelected = document.getElementById("fileUploadName");
        if (filesSelected.files && filesSelected.files[0]) {
            var fileReader = new FileReader();
            var fileToLoad = filesSelected[0];
            $("#inflated").val(Base64.btou(RawDeflate.inflate(Base64.fromBase64(fileToLoad))));
        }

Open in new window

but it give me an error  in base64.js "Uncaught Type Error: Cannot read property 'replace' of undefined"
so any idea what the problem or is there any way to do the require with onther way
thanks
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial