transloadit / uppy

The next open source file uploader for web browsers :dog:
https://uppy.io
MIT License
29.23k stars 2.01k forks source link

Compressor plugin not called when using addFiles programmatically #5524

Open recyclerobot opened 1 day ago

recyclerobot commented 1 day ago

Initial checklist

Steps to reproduce

define a new uppy with compressor plugin:

new Uppy({
  autoProceed: true
})
  .use(Compressor, { convertSize: Infinity })
  .use(ImageEditor)
  .use(Tus, {
    endpoint: "/api/upload"
  })

call uppy.addFile

const generatedId = uppy.addFile({
  id: v4(),
  data: blob,
  name: filename ?? "clipboard-image.png",
  type: type ?? "image/png",
  meta: {
    ourInternalId: 'xxx'
  }
});

Expected behavior

compress the image and upload

Actual behavior

uncompressed image is uploaded.

Using the dashboard, the image does get compressed, only when calling uppy programmatically it won't compress