How to manage responseType = 'blob' using Angular5 in Front end

不打扰是莪最后的温柔 提交于 2019-12-02 09:41:17

I do not know if this will help you (I'm not so engaged with your tools)

The file you are downloading is a DOCX format. This is the modern MS-Word format. This format is - even if it has a different extension - a simple ZIP file.

The PK in the beginning of any zipped file is a magic code, telling consumers what kind of file this is.

"PK" goes back to "PKWARE" and points to Phil Katz, who was one of those who invented the zip format.

A zipped file - as any other file - is just a buch of bytes. A consumer has to know, how to read and interpret this.

You should try to write the byte stream down to a file exactly as you get it, name it "However.docx" and try to open this with MS-Word.

If this does not help, the byte stream might be compressed, or be somehow encoded itself... At least the picture you show us does not look as such.

Do not try to take the characters with copy and paste to any kind of editor. Such files have several invisible characters which will get lost... Take the bytes and store them just as you get them (the same you would do to store a JPEG).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!