Transloadit:complete event not firing

Started by yelkhayami1 reply1,595 views
yelkhayamiOriginal post
#1

Hey,

I’m having trouble figuring out why none of the transloadit events seem to be firing in my setup.

initialize() {
  this.key = this.data.get("key");
  this.template = this.data.get("template");
  this.uppy = this.buildUppy();
}

buildUppy() {
  return new Uppy({
    debug: true,
    autoProceed: false,
    waitForEncoding: true,
    restrictions: {
      minNumberOfFiles: 1,
      maxNumberOfFiles: 1,
      maxFileSize: 500000000,
      allowedFileTypes: ["audio/*"],
    },
  });
 }

connect() {
  this.uppy
    .use(Transloadit, { params: { auth: { key: this.key }, template_id: this.template } })
    .use(DragDrop, { target: this.ddropTarget })
    .use(StatusBar, { target: this.statusTarget })
    .on("transloadit:complete", (assembly) => console.log("Nothing"))
    .on("upload-success", () => this.onUploadSuccess())
    .on("error", (error) => {
      if (error.assembly) {
        console.log(`Assembly ID ${error.assembly.assembly_id} failed!`);
        console.log(error.assembly);
      }
    });
  }

All of the regular events are working, for example this is the upload ‘complete’ event result, it does show some information from the Transloadit plugin

Screenshot 2020-05-07 at 04.46.20

Any help or guidance on how to proceed would be much appreciated 🙂

ajkachnic
#2

Okay so I might know why the event isn’t firing.

This issue talks about it.

tldr;
The waitForEncoding should be passed to Transloadit instead of Uppy