问题
I have used this How to download files using axios.post from webapi (It could be duplicate of this) to work on this scenario but i am not getting success.
React:
axios.post("URL",{data:data, responseType: "blob"})
- In response i am getting corrupted data, not bytes.
- ResponseType works with get request but why not with post?
WebAPI Core:
return File(arraybytes, "application/vnd.openxmlformats-
officedocument.spreadsheetml.sheet", "test.xlsx");
来源:https://stackoverflow.com/questions/55901499/how-to-download-files-using-axios-post-in-react-using-webapi-core