fix: resolve S3 BadDigest error on large file uploads - #42209
fix: resolve S3 BadDigest error on large file uploads#42209abhijeetnardele24-hash wants to merge 5 commits into
Conversation
…Content-MD5 generation to files below multipart threshold
|
Thanks for contributing to Appsmith! Credential-free formatting, lint, type, and unit checks will run after GitHub's workflow approval. An Appsmith maintainer will start privileged integration tests or a deploy preview when needed. No action is required from you while this PR has the |
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. WalkthroughThe changes update REST datasource authentication defaults, restrict OAuth2 expiration input rendering, clear phone widget text on reset, avoid large-file S3 MD5 headers, and default blank Anthropic vision message types to text. ChangesREST datasource authentication
Phone input reset
S3 upload handling
Anthropic vision messages
Priority: ⬆️ High — Impact reflects high issue severity. Estimated code review effort: 3 (Moderate) | ~20 minutes Severity of issue fixed: High Merge Risk: ⚪ Minimal · up to No actionable merge-blocking risk is confirmed for the current changes. Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Out of Scope Changes checkExplanation The PR includes unrelated changes to REST API authentication handling, OAuth2 form rendering, WDSPhoneInputWidget reset behavior, and Anthropic vision message handling. These changes are not related to issue
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Empty fields find sensible shapes, Comment |
Description
Fixes #41971
TransferManager. However, sinceContent-MD5was explicitly being calculated and set in the overallObjectMetadatafor Object Lock compliance, the AWS S3 server rejected the multipart upload with aBadDigesterror. This is because AWS expects an ETag checksum built from part hashes for multipart uploads, not the MD5 hash of the entire file.uploadFileInS3inAmazonS3Plugin.javato dynamically checktransferManager.getConfiguration().getMultipartUploadThreshold()and only compute and set theContent-MD5header if thepayload.lengthis strictly smaller than the multipart threshold. This ensures Object Lock compliance is maintained for small standard uploads, while safely unblocking large file multipart uploads.Type of change
How Has This Been Tested?
TransferManagermultipart initialization defaults.Content-MD5is not forced.Summary by CodeRabbit