【发布时间】:2020-10-29 17:54:57
【问题描述】:
我在 angularjs 中使用 ng-file-upload 时遇到了这个问题。即使后端正在上传(node-js 代码),chrome 也会在 2 分钟后超时并抛出 net::ERR_EMPTY_RESPONSE。我尝试添加超时
Upload.upload({
url: uploadFileAPI,
fields: uploadjson,
file: file,
timeout: 600000
})
但它仍然无法正常工作。 API 需要 4-5 分钟才能响应,但调用会在 2 分钟后超时。有人可以帮忙吗?
【问题讨论】:
-
似乎是 this question 的副本,它也没有答案。如果我是你,我会切换到不同的库或编写自己的上传脚本,如示例here
标签: javascript angularjs google-chrome timeout ng-file-upload