From 7f6cb7a65ddef444fb2300d525d7d8b3f03465bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Thu, 8 Jun 2017 13:36:30 +0200 Subject: [PATCH] transloadit: Mark postprocessing as complete if an error occurred This way stray postprocessing state doesn't interfere in future uploads. --- src/plugins/Transloadit/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/Transloadit/index.js b/src/plugins/Transloadit/index.js index 90b2b00f6..6178346d4 100644 --- a/src/plugins/Transloadit/index.js +++ b/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) }