Add support for success_action_status and success_action_redirect in POST object uploads #426
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements
success_action_statusandsuccess_action_redirectform fields for S3 POST object uploads per AWS S3 REST API spec.Changes
Code Generation:
codegen/src/v1/ops.rsto generate code for extracting and validatingsuccess_action_statusandsuccess_action_redirectfrom multipart formsNew Modules:
crates/s3s/src/ops/post_object.rs: Helper functions for success_action handlinghandle_success_action_redirect: Returns 303 with Location header + query paramshandle_success_action_status: Returns specified status with optional XML bodycrates/s3s/src/dto/post_response.rs:PostResponseDTO with XML serializationRequest handling:
success_action_statusandsuccess_action_redirectfields toS3Extensionssuccess_action_status: Only accepts 200, 201, or 204success_action_redirect: Stored as-is for response handlingResponse modification in PutObject:
success_action_redirecttakes precedence: returns 303 with Location header containing redirect URL + query params (bucket, key, etag)success_action_status:Security:
urlencodingcratequick-xmlserialization infrastructureApplied to both standard and MinIO variants via code generation.
Related
rustfs/rustfs#1073
Original prompt
success_action_statusandsuccess_action_redirectin S3 POST uploads #425💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.