You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a couple drag and drop instances on a page and each one use the S3 plugin. I tried giving the S3 instance a unique ID, but I always get back the default plugin name "AwsS3"
document.querySelectorAll('.js-image-uploader').forEach(elm=>{uppy.use(DragDrop,{id: window.crypto.getRandomValues(newUint32Array(1))[0],// this works finetarget: elm,});uppy.use(AwsS3,{id: window.crypto.getRandomValues(newUint32Array(1))[0],// this doesn't appear to takegetUploadParameters(file){//...}})})
Here's the error. There shouldnt be a plugin named "AwsS3" at this point, correct?
Error: Already found a plugin named 'AwsS3'. Tried to use: 'AwsS3'.
Uppy plugins must have unique 'id' options. See https://uppy.io/docs/plugins/#id.
Is this a bug or am I improperly using the S3 plugin here?
I'm afraid it's both 😄
The S3 plugin is not properly using the id option. Pushing a fix in a moment!
But, adding multiple Dragdrop and AwsS3 plugins probably doesn't do what you want it to. All the DragDrop instances will add files to the same Uppy instance, and once an upload starts, all S3 instances will respond and upload all files. If the user selected a total of 10 and you have 2 S3 instances, both will upload all 10 files. To have multiple different upload areas on a single page, you need to use separate instances of Uppy and add the plugins once to each instance.
I have a couple drag and drop instances on a page and each one use the S3 plugin. I tried giving the S3 instance a unique ID, but I always get back the default plugin name "AwsS3"
Here's the error. There shouldnt be a plugin named "AwsS3" at this point, correct?
package.json
Is this a bug or am I improperly using the S3 plugin here?
The text was updated successfully, but these errors were encountered: