如何处理前端(reactjs)上的res.download(pathName)
我已经在服务器(nodejs)上编写了一个代码,该代码将通过Express Res.Download(Path)向前端发送.CSV文件。我想知道如何使用Fetch API处理响应,这将允许前端下载已发送的文件(.csv)。
我在前端使用ReactJ。
I have written a code on my server(NodeJS) that will send a .csv file to the frontend with express res.download(path). I would like to know how I can handle the response with fetch API that will allow the frontend to download the file(.csv) sent.
I am using reactJs on my frontend.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我能够通过使用 downloadjs 在我的前端
我希望您有帮助您
I was able to solve this by using the downloadJs on my frontend
I hope this helps you