瀏覽代碼

transloadit: Mark postprocessing as complete if an error occurred

This way stray postprocessing state doesn't interfere in future uploads.
Renée Kooi 8 年之前
父節點
當前提交
7f6cb7a65d
共有 1 個文件被更改,包括 5 次插入0 次删除
  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.
         // Remove this handler once we find the assembly we needed.
         this.core.emitter.off('transloadit:assembly-error', onAssemblyError)
         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 the `afterUpload()` promise.
         reject(error)
         reject(error)
       }
       }