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

   Enrich file metadata by surfacing OID as ETag and exposing security scan 
information via user metadata.
   
   # Which issue does this PR close?
   Part of #6830 (item 3: Enrich metadata).
   
   # Rationale for this change
   The HuggingFace API provides rich metadata including OID (object 
identifier), LFS information, and security scan results (antivirus, pickle 
import scanning), but this information was not being exposed through OpenDAL's 
metadata interface.
   
   
   # What changes are included in this PR?
   **Metadata enrichment in both `lister.rs` and `backend.rs`:**
   
   # Are there any user-facing changes?
   **Yes - Enhanced metadata:**
   
   Users now receive enriched metadata when accessing HuggingFace files:
   ```rust
     // List files and get metadata
     let mut lister = op.list("/").await?;
     while let Some(entry) = lister.try_next().await? {
         let meta = entry.metadata();
   
         // NEW: ETag for integrity verification
         if let Some(etag) = meta.etag() {
             println!("File hash: {}", etag);
         }
         // NEW: Security scan information
         if let Some(user_meta) = meta.user_metadata() {
             if let Some(safe) = user_meta.get("security.safe") {
                 println!("File is safe: {}", safe);
             }
         }
     }
   ```
   
   <!---
   If there are any breaking changes to public APIs, please add the 
`breaking-changes` label.
   -->
   No breaking changes - Fully backward compatible. Metadata is additive only


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to