如何下载响应文件反应?

时间:2021-06-07 05:17:36

标签: javascript reactjs

如何下​​载我收到的文档?

这里是响应头:

Accept-Ranges: bytes
Access-Control-Allow-Origin: http://localhost:3000
Cache-Control: public
Connection: keep-alive
Content-Disposition: attachment; filename=reserve_list_1998_02_02.odt
Content-Length: 3621
Content-Type: application/vnd.oasis.opendocument.text

回复: enter image description here

我正在尝试这样做:

<Link to={printDoc} download>DOWNLOAD</Link> // printDoc - my response (picture up)

0 个答案:

没有答案