how to download a zip file

I think you're setting the responseType in the wrong place, instead of this:

$http.post('/api/apiZipPipeLine/', model)

Try this:

$http.post('/api/apiZipPipeLine/', model, {responseType:'arraybuffer'})

Take a look at this answer for more details.


At a matter of fact you are rigth adding responseType:'arraybuffer'. That added to the following code when received the response from ajax will prompt a file to download:

var a = document.createElement('a');
var blob = new Blob([responseData], {'type':"application/octet-stream"});
a.href = URL.createObjectURL(blob);
a.download = "filename.zip";
a.click();