🐛 Fix bugs

This commit is contained in:
2025-08-05 02:10:41 +08:00
parent a9a5082e1a
commit 9e9d0dc563
5 changed files with 9 additions and 17 deletions

View File

@@ -31,6 +31,7 @@ public class CloudFileReferenceObject : ModelBase, ICloudFile
public string Name { get; set; } = string.Empty;
public Dictionary<string, object?> FileMeta { get; set; } = null!;
public Dictionary<string, object?> UserMeta { get; set; } = null!;
public List<ContentSensitiveMark>? SensitiveMarks { get; set; }
public string? MimeType { get; set; }
public string? Hash { get; set; }
public long Size { get; set; }
@@ -44,6 +45,7 @@ public class CloudFileReferenceObject : ModelBase, ICloudFile
Name = proto.Name,
FileMeta = GrpcTypeHelper.ConvertByteStringToObject<Dictionary<string, object?>>(proto.FileMeta) ?? [],
UserMeta = GrpcTypeHelper.ConvertByteStringToObject<Dictionary<string, object?>>(proto.UserMeta) ?? [],
SensitiveMarks = GrpcTypeHelper.ConvertByteStringToObject<List<ContentSensitiveMark>>(proto.SensitiveMarks) ?? [],
MimeType = proto.MimeType,
Hash = proto.Hash,
Size = proto.Size,
@@ -73,6 +75,8 @@ public class CloudFileReferenceObject : ModelBase, ICloudFile
// Convert user metadata
proto.UserMeta = GrpcTypeHelper.ConvertObjectToByteString(UserMeta);
proto.SensitiveMarks = GrpcTypeHelper.ConvertObjectToByteString(SensitiveMarks);
return proto;
}

View File

@@ -24,6 +24,7 @@ message CloudFile {
bytes file_meta = 3;
// User-defined metadata
bytes user_meta = 4;
bytes sensitive_marks = 12;
// MIME type of the file
string mime_type = 5;