Browse Source

transloadit: Mark postprocessing as complete if an error occurred

This way stray postprocessing state doesn't interfere in future uploads.
Renée Kooi 7 years ago
parent
commit
7f6cb7a65d
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/plugins/Transloadit/index.js

+ 5 - 0
src/plugins/Transloadit/index.js

@@ -273,6 +273,11 @@ module.exports = class Transloadit extends Plugin {
         // Remove this handler once we find the assembly we needed.
         this.core.emitter.off('transloadit:assembly-error', onAssemblyError)
 
+        // Clear postprocessing state for all our files.
+        fileIDs.forEach((fileID) => {
+          this.core.emit('core:postprocess-complete', fileID)
+        })
+
         // Reject the `afterUpload()` promise.
         reject(error)
       }