transloadit/uppy

AwsS3/Multipart: Could not read the ETag header. This likely means CORS is not configured correctly on the S3 Bucket.

Closed this issue · 4 comments

Initial checklist

  • I understand this is a bug report and questions should be posted in the Community Forum
  • I searched issues and couldn’t find anything (or linked relevant results below)

Link to runnable example

No response

Steps to reproduce

i am using bunny as my media host, the files are getting uploaded but getting an error in uppy like this.

AwsS3/Multipart: Could not read the ETag header. This likely means CORS is not configured correctly on the S3 Bucket.

so the uppy.on('upload-success') methods does not get called and the path's are then not stored in my db

This started happening when i migrated from v3 to v4

I am using this in remix.run app

let uppy = new Uppy({
debug: true,
autoProceed: false,
restrictions: {
maxFileSize: MEDIA_SIZE.TEN_MB,
allowedFileTypes: ['image/*'],
},
}).use(AwsS3, {
shouldUseMultipart: false,
limit: 1,
getUploadParameters: (file) => {
let fileName = file.data.name;
let uploadName = sanitizeNameForUpload(fileName);
let storageZone = bunny_zone;
let storagePath = /images/${uploadName};
let url = https://ny.storage.bunnycdn.com/${storageZone}${storagePath};
return {
method: 'PUT',
url,
fields: {
name: file.data.name,
storagePath,
},
headers: {
AccessKey: bunny_key,
'Content-Type': 'application/octet-stream',
},
};
},
});

uppy.on('upload-success', (file) => {
saveImageFetcher.submit(
  {
    intent: 'save-image',
    name: file.meta.name,
    path: file.meta.storagePath,
    size: file.size,
  },
  { method: 'post' },
);

});

Expected behavior

should show success on upload

Actual behavior

Error: AwsS3/Multipart: Could not read the ETag header. This likely means CORS is not configured correctly on the S3 Bucket.

Hi, this seems to be about your bucket settings. Take a look at #5388 (comment).

@Murderlon i am using this configuration with bunny.net
i need the getUploadParameters to make dynamic urls for the file upload, previously this was working fine but now when i upgraded it to v4 i am getting this error of not able to read ETag header. any advice on working around this will be really helpful?

Before the errors was also coded in place but the if condition was incorrectly written, which was fixed: #5505. So I wonder if for regular uploads we can ignore the absence of the etag 🤔

Still experiencing this issue with B2 in @uppy/aws-s3: 4.2.3