feat(services/upyun): Add user_metadata support #7068
+28
−1
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.
Which issue does this PR close?
Part of #4842 (partially, upyun part).
Rationale for this change
This PR implements user-defined metadata support for the upyun service, as tracked in issue #4842. User metadata allows users to store custom key-value pairs along with their files, which is useful for various use cases like storing file metadata such as
tenant,catalog,database,table, etc.What changes are included in this PR?
X_UPYUN_META_PREFIXconstant (x-upyun-meta-) incore.rsuploadmethod to set user metadata headers when writing filesinitiate_multipart_uploadmethod to set user metadata headers for multipart uploadswrite_with_user_metadata: truecapability inbackend.rsstatmethod to parse and return user metadata usingparse_prefixed_headersAre there any user-facing changes?
Yes. Users can now use
write_with_user_metadatato set custom metadata when uploading files to upyun, and retrieve the metadata viastatoperation.AI Usage Statement
This PR was developed with the assistance of GitHub Copilot (Claude Opus 4.5).