Failed to load resource: net::ERR_FILE_NOT_FOUND uploading files bigger than 500Mb

馋奶兔 提交于 2019-12-07 22:42:46

问题


I have a problem uploading files bigger than 500Mb.

I created a plunker file with error code: https://plnkr.co/edit/vKHNkUuVX1RrMcZ6Ezhc?p=preview

var request = new XMLHttpRequest();
request.open("POST", "/uploadFile");
request.send(formData);

request.addEventListener("progress", function(evt) {
  if (evt.lengthComputable) {
    console.log(evt.loaded / evt.total);
  } else {
    console.log('Undefined percent...');
  }
}, false);
request.addEventListener("load", function(evt) {
  console.error(evt);
}, false);
request.addEventListener("error", function(evt) {
  console.error(evt);
}, false);

To reproduce the error:

  1. Open Chrome with link of plunker file.
  2. Open inspector console (F12).
  3. Upload file with size between 300Mb and 500Mb.
  4. Server response with error, but the code try to upload the file selected.
  5. Upload file bigger than 200Mb.
  6. Get an net::ERR_FILE_NOT_FOUND from client code, the call not arrive to server.

Best regards and thanks.

来源:https://stackoverflow.com/questions/38139882/failed-to-load-resource-neterr-file-not-found-uploading-files-bigger-than-500

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