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

aws-s3: upload-success fired without s3Multipart set #5513

Open fschwahn opened 1 week ago

fschwahn commented 1 week ago

Initial checklist

Link to runnable example

No response

Steps to reproduce

I'm using uppy as follows:

    this.uppy = new Uppy(uppyOptions);
    this.uppy.use(DragDrop, { target: el });
    this.uppy.use(AwsS3, {
      endpoint: "/",
      headers: options.companionHeaders || {},
      shouldUseMultipart: true,
    });

Sometimes, the upload-success-callback is called, but file.s3Multipart is not set.

I wasn't able to reproduce myself, but it happens regularly (ie. once / twice per day) in production. I added some logging to the upload-success-callback, and this is passed in as file into upload-success:

{
    "data":
    {
        "relativePath": null
    },
    "extension": "mov",
    "id": "FileUploader7-spielszene/1/mov-10-2v-10-1e-video/quicktime-56090352-1731593973000",
    "isGhost": false,
    "isRemote": false,
    "meta":
    {
        "name": "Spielszene 1.mov",
        "relativePath": null,
        "type": "video/quicktime"
    },
    "name": "Spielszene 1.mov",
    "progress":
    {
        "bytesTotal": 56090352,
        "bytesUploaded": 56090352,
        "percentage": 100,
        "uploadComplete": false,
        "uploadStarted": null
    },
    "size": 56090352,
    "source": "DragDrop",
    "type": "video/quicktime"
}

It can be seen that s3Multipart is completely missing from the file-object.

Expected behavior

When upload-success is invoked s3Multipart should always be set.

Actual behavior

file.s3Multipart is missing.

Murderlon commented 6 days ago

Hi, without a way to reproduce this I'm not sure how this issue can become actionable and therefor be closed.

fschwahn commented 6 days ago

I know this is not much to go on, but could you give me hints how I can debug this? This is happening a few times per day (out of 100s of uploads), and I'm not sure how this callback gets invoked without s3Multipart set, or what I could do wrong in my integration to force cause such a behavior.

Murderlon commented 5 days ago

I'll try to take a look if I can spot something when I have time.