Corrupted Zip while returning from Web API?
问题 On my MVC project I have an AJAX call to a Web API. I send an array of documents' routes, the API (should) zips them and returns the zip file . self.zipDocs = function (docs, callback) { $.ajax({ url: "../SharedAPI/documents/zip", type: "POST", data: docs, contentType: "application/json", success: function (data) { var zip = new JSZip(data); var content = zip.generate({ type: "blob" }); saveAs(content, "example.zip"); }, error: function (data) { callback(data); } }); } And my ZipDocs function