XHR abort doesn't stop file uploading

后端 未结 3 883
鱼传尺愫
鱼传尺愫 2020-12-20 06:14

I\'ve made an XHR-based file uploader with progressbar, and I would like to add a feature to cancel the upload before it fully uploaded. The simlified code (runs after DOM r

3条回答
  •  盖世英雄少女心
    2020-12-20 07:07

    I have the same problem.

    XMLHttpRequest.abort() just stop notifying XMLHttpRequest.uplad.progress.

    XMLHttpRequest.abort() can't stop Chrome(63.0.3239.132) uploading files.

    I tried the formObject.reset() with upload 1G file and it works.

    Network usage in windows task manager goes down to zero after calling formObject.reset().

    
    
    

提交回复
热议问题