Xuanwo commented on code in PR #6834:
URL: https://github.com/apache/opendal/pull/6834#discussion_r2572941039


##########
core/src/services/huggingface/backend.rs:
##########
@@ -242,6 +242,37 @@ impl Access for HuggingfaceBackend {
 
                     meta.set_content_length(status.size);
 
+                    // Use LFS OID as ETag if available, otherwise use regular 
OID
+                    let etag = if let Some(lfs) = &status.lfs {
+                        &lfs.oid
+                    } else {
+                        &status.oid
+                    };
+                    meta.set_etag(etag);

Review Comment:
   I think we only need to support etag.



##########
core/src/services/huggingface/backend.rs:
##########
@@ -242,6 +242,37 @@ impl Access for HuggingfaceBackend {
 
                     meta.set_content_length(status.size);
 
+                    // Use LFS OID as ETag if available, otherwise use regular 
OID
+                    let etag = if let Some(lfs) = &status.lfs {
+                        &lfs.oid
+                    } else {
+                        &status.oid
+                    };
+                    meta.set_etag(etag);
+
+                    // Add security scan flags to user metadata if available
+                    if let Some(security) = &status.security {
+                        let mut user_meta = std::collections::HashMap::new();
+                        user_meta.insert("security.safe".to_string(), 
security.safe.to_string());
+                        user_meta.insert("security.blob_id".to_string(), 
security.blob_id.clone());

Review Comment:
   `user_meta` are provided by users, but in this case, they aren’t actual user 
metadata. Let’s ignore them.



-- 
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