javascript - Gzip compress PDF files in Parse -


is there way compress (gzip) pdf files in parse? also, idea - checked gzipping text-based pdf file, , file size reduced around 30%.

simplified code example --

<input type="file" id="pdffileupload">  var fileuploadcontrol = $("#pdffileupload")[0]; var file = fileuploadcontrol.files[0]; // compress file here var parsefile = new parse.file(name, file); // or compress parsefile here  parsefile.save().then(function() {   // file has been saved parse. }, function(error) {   // file either not read, or not saved parse. }); 

here in case, can compress file object using gzip compression method? best way it?

moreover, recommended way improve latency when uploading , downloading pdf files (~5 mb)?

it appears want browser. best solution rely on client's browser, if can afford it, compress pdf file, upload parse, download compressed file parse , uncompress on other client's browser. can use javascript implementation of zlib pako in browser. seems parse backend not yet delivering static content files via cdns, if have concerns on network latency , delivery while scale, might want host files somewhere other parse.


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -