Skip to content

Conversation

@userzhy
Copy link
Contributor

@userzhy userzhy commented Dec 19, 2025

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?

  • Added X_UPYUN_META_PREFIX constant (x-upyun-meta-) in core.rs
  • Updated upload method to set user metadata headers when writing files
  • Updated initiate_multipart_upload method to set user metadata headers for multipart uploads
  • Added write_with_user_metadata: true capability in backend.rs
  • Updated stat method to parse and return user metadata using parse_prefixed_headers

Are there any user-facing changes?

Yes. Users can now use write_with_user_metadata to set custom metadata when uploading files to upyun, and retrieve the metadata via stat operation.

AI Usage Statement

This PR was developed with the assistance of GitHub Copilot (Claude Opus 4.5).

@userzhy userzhy requested a review from Xuanwo as a code owner December 19, 2025 15:10
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. releases-note/feat The PR implements a new feature or has a title that begins with "feat" labels Dec 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

releases-note/feat The PR implements a new feature or has a title that begins with "feat" size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant