You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "zhan7236 (via GitHub)" <gi...@apache.org> on 2025/12/01 02:48:02 UTC

[PR] feat(services/azfile): Add user defined metadata support [opendal]

zhan7236 opened a new pull request, #6841:
URL: https://github.com/apache/opendal/pull/6841

   # Which issue does this PR close?
   
   Part of #4842.
   
   # Rationale for this change
   
   This PR adds user defined metadata support for the Azure File service (`azfile`), which allows users to write and read custom metadata along with their files.
   
   # What changes are included in this PR?
   
   - Add `X_MS_META_PREFIX` constant (`"x-ms-meta-"`) in `core.rs` for user metadata HTTP header prefix
   - Add user metadata headers support in `azfile_create_file` function
   - Enable `write_with_user_metadata` capability in the service
   - Parse user metadata from response headers in `stat` function using `parse_prefixed_headers`
   
   # Are there any user-facing changes?
   
   Yes, users can now use `write_with().user_metadata()` to set custom metadata when writing files to Azure File service, and retrieve them via `stat()`.
   
   Example:
   ```rust
   let metadata = vec![("location".to_string(), "everywhere".to_string())];
   op.write_with(&path, content)
       .user_metadata(metadata)
       .await?;
   
   let meta = op.stat(&path).await?;
   let user_meta = meta.user_metadata();


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(services/azfile): Add user defined metadata support [opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo merged PR #6841:
URL: https://github.com/apache/opendal/pull/6841


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org