From 435a267a8e8249915ae9cef2324c4e39b8557be3 Mon Sep 17 00:00:00 2001 From: Jonathan Wong Date: Wed, 11 Feb 2026 16:48:02 -0600 Subject: [PATCH] Clarify ETag requirement for uploads Updated warning message for missing ETag header to clarify its necessity for multipart uploads and allow single uploads to proceed without it. --- packages/@uppy/aws-s3/src/index.ts | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/packages/@uppy/aws-s3/src/index.ts b/packages/@uppy/aws-s3/src/index.ts index d248f4c5b..9f0ca636b 100644 --- a/packages/@uppy/aws-s3/src/index.ts +++ b/packages/@uppy/aws-s3/src/index.ts @@ -774,11 +774,17 @@ export default class AwsS3Multipart< ) } if (etag == null) { - console.error( - '@uppy/aws-s3: Could not read the ETag header. This likely means CORS is not configured correctly on the S3 Bucket. See https://uppy.io/docs/aws-s3/#setting-up-your-s3-bucket', - ) - return - } + // ETag is only strictly required for multipart uploads (to complete the upload). + // For non-multipart uploads (single PUT/POST), it's just metadata. + // We warn but don't block completion for non-multipart uploads. + console.warn( + '@uppy/aws-s3: Could not read the ETag header. This likely means CORS is not configured correctly on the S3 Bucket. See https://uppy.io/docs/aws-s3/#setting-up-your-s3-bucket', + ) + } + + // Use ETag if available, otherwise fall back to location or a generated value. + // ETag is required for multipart completion, but for single uploads we can proceed without it. + const finalEtag = etag || location || `${Date.now()}` onComplete?.(etag) resolve({