Browse Source

core: Clear upload progress when upload starts.

This fixes an issue when retrying Tus uploads with the Transloadit
plugin. `uploadComplete` would be true, so the Dashboard would show the
file as complete while it was uploading again.
Renée Kooi 7 years ago
parent
commit
c7fd08a56c
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/core/Core.js

+ 4 - 1
src/core/Core.js

@@ -628,7 +628,10 @@ class Uppy {
       const updatedFile = Object.assign({}, updatedFiles[fileID],
         Object.assign({}, {
           progress: Object.assign({}, updatedFiles[fileID].progress, {
-            uploadStarted: Date.now()
+            uploadStarted: Date.now(),
+            uploadComplete: false,
+            percentage: 0,
+            bytesUploaded: 0
           })
         }
       ))