Upload file with Fetch API in Javascript and show progress [duplicate]
问题 This question already has an answer here: Upload progress indicators for fetch? 8 answers I'm using Fetch API in Javascript to upload big file to server. Is there any event in Fetch API that I could use to track progress of upload? 回答1: This is NOT possible. The reason is the way the Fetch API works. The fetch method returns a Promise; the Promise API uses a then method to which you can attach “success” and “failure” callbacks. Therefore, you can gain access to progress. Still, don't lose