Browse Source

Merge pull request #393 from transloadit/reset-progress

core: Clear upload progress when upload starts.
Renée Kooi 7 years ago
parent
commit
5f4b2674dd
2 changed files with 5 additions and 1 deletions
  1. 1 0
      CHANGELOG.md
  2. 4 1
      src/core/Core.js

+ 1 - 0
CHANGELOG.md

@@ -49,6 +49,7 @@ Ideas that will be planned and find their way into a release at one point
 - [ ] consider iframe / more security for Transloadit/Uppy integration widget
 - [ ] statusbar: add option to always show
 - [ ] tus: Rename Tus10 → Tus
+- [ ] have a `resetProgress` method for resetting a single file, and call it before starting an upload. see comment in #393
 
 ## 1.0 Goals
 

+ 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
           })
         }
       ))