Browse Source

transloadit: Emit file upload error if assembly fails.

Renée Kooi 7 years ago
parent
commit
e69d8f72a8
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/plugins/Transloadit/index.js

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

@@ -423,6 +423,9 @@ module.exports = class Transloadit extends Plugin {
         // Clear postprocessing state for all our files.
         const files = this.getAssemblyFiles(assembly.assembly_id)
         files.forEach((file) => {
+          // TODO Maybe make a postprocess-error event here?
+          this.core.emit('core:upload-error', file.id, error)
+
           this.core.emit('core:postprocess-complete', file.id)
         })