I’m generating a docx file in a .net backend by reading a docx template and writing to it. Then I return it to the frontend client by saving the bytestream to a byte and receiving it as an blob.
However, my issue is that I receive a “Corrupt file warning, do you want to try to restore it?” in Word when I open the downloaded docx file. The file is restored and working as intended though.
I don’t get the Corrupt file error if I save the generated file directly to disk.
How do i solve this?
- Frontend: React with superagent.