Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 tasks done
shabanbx opened this issue Nov 15, 2024 · 0 comments
Labels

Comments

@shabanbx
Copy link

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.

@shabanbx shabanbx added the Bug label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant