ソースを参照

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 年 前
コミット
c7fd08a56c
1 ファイル変更4 行追加1 行削除
  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],
       const updatedFile = Object.assign({}, updatedFiles[fileID],
         Object.assign({}, {
         Object.assign({}, {
           progress: Object.assign({}, updatedFiles[fileID].progress, {
           progress: Object.assign({}, updatedFiles[fileID].progress, {
-            uploadStarted: Date.now()
+            uploadStarted: Date.now(),
+            uploadComplete: false,
+            percentage: 0,
+            bytesUploaded: 0
           })
           })
         }
         }
       ))
       ))