I need to send a blob to the server with ajax, but it can end up getting somewhat large, and I\'d like to decrease upload time. I\'ve tried jszip already, but that just gave me
JS Zip will work fine just correct your syntax..
function create_zip() {
var zip = new JSZip();
zip.add("recording.wav", blobfile);//here you have to give blobFile in the form of raw bits >> convert it in json notation.. or stream ..
zip.add("hello2.txt", "Hello Second World\n");//this is optional..
content = zip.generate();
location.href="data:application/zip;base64," + content;
}
you can add multiple files too..
Just zip.file will become zip.add
and then zip.generate() will do the rest.. as you have done,
or refer old Post its last part of JavaScript, and NativeBridge will be helpful if you can utilize, in this post user records using Objective C that you can ignore, but sends this object using JavaScript and Socket that you can/may utilize..
I hope this will do ... :)