Home > Blockchain >  Streaming zip to browser doesn't work, but works in Postman
Streaming zip to browser doesn't work, but works in Postman

Time:02-01

I'm using the following error 1

Or

error 2

After some research I always come to the same solution and that is to set the responseType and it seems to work for everyone. However, if I try to do that I get the following console errors, and I can't find any related issues when I google it:

console error

I've also tried with different content types, but can't seem to get my head around it. Especially because it works in Postman.

Related issue, but that was fixed by using arraybuffer: https://github.com/orangewise/s3-zip/issues/45

CodePudding user response:

According to https://stackoverflow.com/a/58696592 axios doesn't support file streaming right now. I used native fetch and now it works fine.

The dozens of examples on how to do it with axios are pretty misleading.

  •  Tags:  
  • Related