Skip to content

Missing ETag from S3 UploadPart response #1362

Closed
@madsborup

Description

@madsborup

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

Similar to aws/aws-sdk-js-v3#5708

I'm trying to implement MultiPartUpload using the AWS S3 client, but the response object of UploadPart does not include the ETag property, though it's included in the HTTP response. I suspect this may be due to ETag header not allowed in CORS settings (as mentioned in the above similar issue).

To Reproduce

const client = new S3Client({
  forcePathStyle: true,
  region: "eu-central-1",
  endpoint: "https://....supabase.co/storage/v1/s3",
  credentials: {
    accessKeyId: "...",
    secretAccessKey: process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY,
    sessionToken: userSession.access_token,
  },
});

const uploadPartResponse = await client.send(
  new UploadPartCommand({
    Bucket: BUCKET_NAME,
    Key: key,
    PartNumber: partNumber,
    UploadId: uploadId,
    Body: chunk,
  })
);

Expected behavior

ETag property should be present in uploadPartResponse object.

Screenshots

Image Image

System information

  • OS: macOS
  • @supabase/supabase-js: ^2.48.1
  • @aws-sdk/client-s3: ^3.733.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions