tamar-file-hub-client 0.0.9__py3-none-any.whl → 0.0.10__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,7 +26,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__
26
26
  from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
27
27
 
28
28
 
29
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x12\x66ile_service.proto\x12\x04\x66ile\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xab\x01\n\x04\x46ile\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tfolder_id\x18\x02 \x01(\t\x12\x11\n\tfile_name\x18\x03 \x01(\t\x12\x11\n\tfile_type\x18\x04 \x01(\t\x12.\n\ncreated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nupdated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xb7\x02\n\nUploadFile\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tfolder_id\x18\x02 \x01(\t\x12\x0f\n\x07\x66ile_id\x18\x03 \x01(\t\x12\x14\n\x0cstorage_type\x18\x04 \x01(\t\x12\x13\n\x0bstored_name\x18\x05 \x01(\t\x12\x13\n\x0bstored_path\x18\x06 \x01(\t\x12\x11\n\tfile_name\x18\x07 \x01(\t\x12\x11\n\tfile_size\x18\x08 \x01(\x03\x12\x10\n\x08\x66ile_ext\x18\t \x01(\t\x12\x11\n\tmime_type\x18\n \x01(\t\x12\x0e\n\x06status\x18\x0b \x01(\t\x12.\n\ncreated_at\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nupdated_at\x18\r \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xdf\x01\n\x11UploadFileRequest\x12\x16\n\tfolder_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\tfile_name\x18\x02 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\x0c\x12\x11\n\tfile_type\x18\x04 \x01(\t\x12\x11\n\tmime_type\x18\x05 \x01(\t\x12\x19\n\x0cis_temporary\x18\x06 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0e\x65xpire_seconds\x18\x07 \x01(\x05H\x02\x88\x01\x01\x42\x0c\n\n_folder_idB\x0f\n\r_is_temporaryB\x11\n\x0f_expire_seconds\"\xf3\x01\n\x10UploadUrlRequest\x12\x16\n\tfolder_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\tfile_name\x18\x02 \x01(\t\x12\x11\n\tfile_type\x18\x03 \x01(\t\x12\x11\n\tmime_type\x18\x04 \x01(\t\x12\x11\n\tfile_size\x18\x05 \x01(\x03\x12\x11\n\tfile_hash\x18\x06 \x01(\t\x12\x19\n\x0cis_temporary\x18\x07 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0e\x65xpire_seconds\x18\x08 \x01(\x05H\x02\x88\x01\x01\x42\x0c\n\n_folder_idB\x0f\n\r_is_temporaryB\x11\n\x0f_expire_seconds\")\n\x16UploadCompletedRequest\x12\x0f\n\x07\x66ile_id\x18\x01 \x01(\t\"U\n\x12\x44ownloadUrlRequest\x12\x0f\n\x07\x66ile_id\x18\x01 \x01(\t\x12\x1b\n\x0e\x65xpire_seconds\x18\x02 \x01(\x05H\x00\x88\x01\x01\x42\x11\n\x0f_expire_seconds\"\xd4\x01\n\x10ShareLinkRequest\x12\x0f\n\x07\x66ile_id\x18\x01 \x01(\t\x12\x11\n\tis_public\x18\x02 \x01(\x08\x12\x14\n\x0c\x61\x63\x63\x65ss_scope\x18\x03 \x01(\t\x12\x1b\n\x0e\x65xpire_seconds\x18\x04 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\nmax_access\x18\x05 \x01(\x05H\x01\x88\x01\x01\x12\x1b\n\x0eshare_password\x18\x06 \x01(\tH\x02\x88\x01\x01\x42\x11\n\x0f_expire_secondsB\r\n\x0b_max_accessB\x11\n\x0f_share_password\"\x82\x01\n\x10\x46ileVisitRequest\x12\x15\n\rfile_share_id\x18\x01 \x01(\t\x12\x13\n\x0b\x61\x63\x63\x65ss_type\x18\x02 \x01(\t\x12\x17\n\x0f\x61\x63\x63\x65ss_duration\x18\x03 \x01(\x05\x12)\n\x08metadata\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\"!\n\x0eGetFileRequest\x12\x0f\n\x07\x66ile_id\x18\x01 \x01(\t\"6\n\x11RenameFileRequest\x12\x0f\n\x07\x66ile_id\x18\x01 \x01(\t\x12\x10\n\x08new_name\x18\x02 \x01(\t\"$\n\x11\x44\x65leteFileRequest\x12\x0f\n\x07\x66ile_id\x18\x01 \x01(\t\"\x8d\x02\n\x10ListFilesRequest\x12\x16\n\tfolder_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\tfile_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x11\n\tfile_type\x18\x03 \x03(\t\x12\x1c\n\x0f\x63reated_by_role\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x17\n\ncreated_by\x18\x05 \x01(\tH\x03\x88\x01\x01\x12\x16\n\tpage_size\x18\x06 \x01(\x05H\x04\x88\x01\x01\x12\x11\n\x04page\x18\x07 \x01(\x05H\x05\x88\x01\x01\x42\x0c\n\n_folder_idB\x0c\n\n_file_nameB\x12\n\x10_created_by_roleB\r\n\x0b_created_byB\x0c\n\n_page_sizeB\x07\n\x05_page\"U\n\x12UploadFileResponse\x12\x18\n\x04\x66ile\x18\x01 \x01(\x0b\x32\n.file.File\x12%\n\x0bupload_file\x18\x02 \x01(\x0b\x32\x10.file.UploadFile\"a\n\x11UploadUrlResponse\x12\x18\n\x04\x66ile\x18\x01 \x01(\x0b\x32\n.file.File\x12%\n\x0bupload_file\x18\x02 \x01(\x0b\x32\x10.file.UploadFile\x12\x0b\n\x03url\x18\x03 \x01(\t\"\"\n\x13\x44ownloadUrlResponse\x12\x0b\n\x03url\x18\x01 \x01(\t\"*\n\x11ShareLinkResponse\x12\x15\n\rfile_share_id\x18\x01 \x01(\t\"-\n\x10\x46ileListResponse\x12\x19\n\x05\x66iles\x18\x01 \x03(\x0b\x32\n.file.File\"\x07\n\x05\x45mpty2\xbd\x05\n\x0b\x46ileService\x12?\n\nUploadFile\x12\x17.file.UploadFileRequest\x1a\x18.file.UploadFileResponse\x12\x44\n\x11GenerateUploadUrl\x12\x16.file.UploadUrlRequest\x1a\x17.file.UploadUrlResponse\x12M\n\x1aGenerateResumableUploadUrl\x12\x16.file.UploadUrlRequest\x1a\x17.file.UploadUrlResponse\x12\x43\n\x16\x43onfirmUploadCompleted\x12\x1c.file.UploadCompletedRequest\x1a\x0b.file.Empty\x12J\n\x13GenerateDownloadUrl\x12\x18.file.DownloadUrlRequest\x1a\x19.file.DownloadUrlResponse\x12\x44\n\x11GenerateShareLink\x12\x16.file.ShareLinkRequest\x1a\x17.file.ShareLinkResponse\x12\x30\n\tVisitFile\x12\x16.file.FileVisitRequest\x1a\x0b.file.Empty\x12+\n\x07GetFile\x12\x14.file.GetFileRequest\x1a\n.file.File\x12\x31\n\nRenameFile\x12\x17.file.RenameFileRequest\x1a\n.file.File\x12\x32\n\nDeleteFile\x12\x17.file.DeleteFileRequest\x1a\x0b.file.Empty\x12;\n\tListFiles\x12\x16.file.ListFilesRequest\x1a\x16.file.FileListResponseb\x06proto3')
29
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x12\x66ile_service.proto\x12\x04\x66ile\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xab\x01\n\x04\x46ile\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tfolder_id\x18\x02 \x01(\t\x12\x11\n\tfile_name\x18\x03 \x01(\t\x12\x11\n\tfile_type\x18\x04 \x01(\t\x12.\n\ncreated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nupdated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xb7\x02\n\nUploadFile\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tfolder_id\x18\x02 \x01(\t\x12\x0f\n\x07\x66ile_id\x18\x03 \x01(\t\x12\x14\n\x0cstorage_type\x18\x04 \x01(\t\x12\x13\n\x0bstored_name\x18\x05 \x01(\t\x12\x13\n\x0bstored_path\x18\x06 \x01(\t\x12\x11\n\tfile_name\x18\x07 \x01(\t\x12\x11\n\tfile_size\x18\x08 \x01(\x03\x12\x10\n\x08\x66ile_ext\x18\t \x01(\t\x12\x11\n\tmime_type\x18\n \x01(\t\x12\x0e\n\x06status\x18\x0b \x01(\t\x12.\n\ncreated_at\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nupdated_at\x18\r \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xdf\x01\n\x11UploadFileRequest\x12\x16\n\tfolder_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\tfile_name\x18\x02 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\x0c\x12\x11\n\tfile_type\x18\x04 \x01(\t\x12\x11\n\tmime_type\x18\x05 \x01(\t\x12\x19\n\x0cis_temporary\x18\x06 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0e\x65xpire_seconds\x18\x07 \x01(\x05H\x02\x88\x01\x01\x42\x0c\n\n_folder_idB\x0f\n\r_is_temporaryB\x11\n\x0f_expire_seconds\"\xf3\x01\n\x10UploadUrlRequest\x12\x16\n\tfolder_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x11\n\tfile_name\x18\x02 \x01(\t\x12\x11\n\tfile_type\x18\x03 \x01(\t\x12\x11\n\tmime_type\x18\x04 \x01(\t\x12\x11\n\tfile_size\x18\x05 \x01(\x03\x12\x11\n\tfile_hash\x18\x06 \x01(\t\x12\x19\n\x0cis_temporary\x18\x07 \x01(\x08H\x01\x88\x01\x01\x12\x1b\n\x0e\x65xpire_seconds\x18\x08 \x01(\x05H\x02\x88\x01\x01\x42\x0c\n\n_folder_idB\x0f\n\r_is_temporaryB\x11\n\x0f_expire_seconds\")\n\x16UploadCompletedRequest\x12\x0f\n\x07\x66ile_id\x18\x01 \x01(\t\"u\n\x12\x44ownloadUrlRequest\x12\x0f\n\x07\x66ile_id\x18\x01 \x01(\t\x12\x13\n\x06is_cdn\x18\x03 \x01(\x08H\x00\x88\x01\x01\x12\x1b\n\x0e\x65xpire_seconds\x18\x02 \x01(\x05H\x01\x88\x01\x01\x42\t\n\x07_is_cdnB\x11\n\x0f_expire_seconds\"\xd4\x01\n\x10ShareLinkRequest\x12\x0f\n\x07\x66ile_id\x18\x01 \x01(\t\x12\x11\n\tis_public\x18\x02 \x01(\x08\x12\x14\n\x0c\x61\x63\x63\x65ss_scope\x18\x03 \x01(\t\x12\x1b\n\x0e\x65xpire_seconds\x18\x04 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\nmax_access\x18\x05 \x01(\x05H\x01\x88\x01\x01\x12\x1b\n\x0eshare_password\x18\x06 \x01(\tH\x02\x88\x01\x01\x42\x11\n\x0f_expire_secondsB\r\n\x0b_max_accessB\x11\n\x0f_share_password\"\x82\x01\n\x10\x46ileVisitRequest\x12\x15\n\rfile_share_id\x18\x01 \x01(\t\x12\x13\n\x0b\x61\x63\x63\x65ss_type\x18\x02 \x01(\t\x12\x17\n\x0f\x61\x63\x63\x65ss_duration\x18\x03 \x01(\x05\x12)\n\x08metadata\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\"!\n\x0eGetFileRequest\x12\x0f\n\x07\x66ile_id\x18\x01 \x01(\t\"6\n\x11RenameFileRequest\x12\x0f\n\x07\x66ile_id\x18\x01 \x01(\t\x12\x10\n\x08new_name\x18\x02 \x01(\t\"$\n\x11\x44\x65leteFileRequest\x12\x0f\n\x07\x66ile_id\x18\x01 \x01(\t\"\x8d\x02\n\x10ListFilesRequest\x12\x16\n\tfolder_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\tfile_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x11\n\tfile_type\x18\x03 \x03(\t\x12\x1c\n\x0f\x63reated_by_role\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x17\n\ncreated_by\x18\x05 \x01(\tH\x03\x88\x01\x01\x12\x16\n\tpage_size\x18\x06 \x01(\x05H\x04\x88\x01\x01\x12\x11\n\x04page\x18\x07 \x01(\x05H\x05\x88\x01\x01\x42\x0c\n\n_folder_idB\x0c\n\n_file_nameB\x12\n\x10_created_by_roleB\r\n\x0b_created_byB\x0c\n\n_page_sizeB\x07\n\x05_page\"U\n\x12UploadFileResponse\x12\x18\n\x04\x66ile\x18\x01 \x01(\x0b\x32\n.file.File\x12%\n\x0bupload_file\x18\x02 \x01(\x0b\x32\x10.file.UploadFile\"a\n\x11UploadUrlResponse\x12\x18\n\x04\x66ile\x18\x01 \x01(\x0b\x32\n.file.File\x12%\n\x0bupload_file\x18\x02 \x01(\x0b\x32\x10.file.UploadFile\x12\x0b\n\x03url\x18\x03 \x01(\t\"\"\n\x13\x44ownloadUrlResponse\x12\x0b\n\x03url\x18\x01 \x01(\t\"*\n\x11ShareLinkResponse\x12\x15\n\rfile_share_id\x18\x01 \x01(\t\"-\n\x10\x46ileListResponse\x12\x19\n\x05\x66iles\x18\x01 \x03(\x0b\x32\n.file.File\"\x07\n\x05\x45mpty2\xbd\x05\n\x0b\x46ileService\x12?\n\nUploadFile\x12\x17.file.UploadFileRequest\x1a\x18.file.UploadFileResponse\x12\x44\n\x11GenerateUploadUrl\x12\x16.file.UploadUrlRequest\x1a\x17.file.UploadUrlResponse\x12M\n\x1aGenerateResumableUploadUrl\x12\x16.file.UploadUrlRequest\x1a\x17.file.UploadUrlResponse\x12\x43\n\x16\x43onfirmUploadCompleted\x12\x1c.file.UploadCompletedRequest\x1a\x0b.file.Empty\x12J\n\x13GenerateDownloadUrl\x12\x18.file.DownloadUrlRequest\x1a\x19.file.DownloadUrlResponse\x12\x44\n\x11GenerateShareLink\x12\x16.file.ShareLinkRequest\x1a\x17.file.ShareLinkResponse\x12\x30\n\tVisitFile\x12\x16.file.FileVisitRequest\x1a\x0b.file.Empty\x12+\n\x07GetFile\x12\x14.file.GetFileRequest\x1a\n.file.File\x12\x31\n\nRenameFile\x12\x17.file.RenameFileRequest\x1a\n.file.File\x12\x32\n\nDeleteFile\x12\x17.file.DeleteFileRequest\x1a\x0b.file.Empty\x12;\n\tListFiles\x12\x16.file.ListFilesRequest\x1a\x16.file.FileListResponseb\x06proto3')
30
30
 
31
31
  _globals = globals()
32
32
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -44,31 +44,31 @@ if not _descriptor._USE_C_DESCRIPTORS:
44
44
  _globals['_UPLOADCOMPLETEDREQUEST']._serialized_start=1051
45
45
  _globals['_UPLOADCOMPLETEDREQUEST']._serialized_end=1092
46
46
  _globals['_DOWNLOADURLREQUEST']._serialized_start=1094
47
- _globals['_DOWNLOADURLREQUEST']._serialized_end=1179
48
- _globals['_SHARELINKREQUEST']._serialized_start=1182
49
- _globals['_SHARELINKREQUEST']._serialized_end=1394
50
- _globals['_FILEVISITREQUEST']._serialized_start=1397
51
- _globals['_FILEVISITREQUEST']._serialized_end=1527
52
- _globals['_GETFILEREQUEST']._serialized_start=1529
53
- _globals['_GETFILEREQUEST']._serialized_end=1562
54
- _globals['_RENAMEFILEREQUEST']._serialized_start=1564
55
- _globals['_RENAMEFILEREQUEST']._serialized_end=1618
56
- _globals['_DELETEFILEREQUEST']._serialized_start=1620
57
- _globals['_DELETEFILEREQUEST']._serialized_end=1656
58
- _globals['_LISTFILESREQUEST']._serialized_start=1659
59
- _globals['_LISTFILESREQUEST']._serialized_end=1928
60
- _globals['_UPLOADFILERESPONSE']._serialized_start=1930
61
- _globals['_UPLOADFILERESPONSE']._serialized_end=2015
62
- _globals['_UPLOADURLRESPONSE']._serialized_start=2017
63
- _globals['_UPLOADURLRESPONSE']._serialized_end=2114
64
- _globals['_DOWNLOADURLRESPONSE']._serialized_start=2116
65
- _globals['_DOWNLOADURLRESPONSE']._serialized_end=2150
66
- _globals['_SHARELINKRESPONSE']._serialized_start=2152
67
- _globals['_SHARELINKRESPONSE']._serialized_end=2194
68
- _globals['_FILELISTRESPONSE']._serialized_start=2196
69
- _globals['_FILELISTRESPONSE']._serialized_end=2241
70
- _globals['_EMPTY']._serialized_start=2243
71
- _globals['_EMPTY']._serialized_end=2250
72
- _globals['_FILESERVICE']._serialized_start=2253
73
- _globals['_FILESERVICE']._serialized_end=2954
47
+ _globals['_DOWNLOADURLREQUEST']._serialized_end=1211
48
+ _globals['_SHARELINKREQUEST']._serialized_start=1214
49
+ _globals['_SHARELINKREQUEST']._serialized_end=1426
50
+ _globals['_FILEVISITREQUEST']._serialized_start=1429
51
+ _globals['_FILEVISITREQUEST']._serialized_end=1559
52
+ _globals['_GETFILEREQUEST']._serialized_start=1561
53
+ _globals['_GETFILEREQUEST']._serialized_end=1594
54
+ _globals['_RENAMEFILEREQUEST']._serialized_start=1596
55
+ _globals['_RENAMEFILEREQUEST']._serialized_end=1650
56
+ _globals['_DELETEFILEREQUEST']._serialized_start=1652
57
+ _globals['_DELETEFILEREQUEST']._serialized_end=1688
58
+ _globals['_LISTFILESREQUEST']._serialized_start=1691
59
+ _globals['_LISTFILESREQUEST']._serialized_end=1960
60
+ _globals['_UPLOADFILERESPONSE']._serialized_start=1962
61
+ _globals['_UPLOADFILERESPONSE']._serialized_end=2047
62
+ _globals['_UPLOADURLRESPONSE']._serialized_start=2049
63
+ _globals['_UPLOADURLRESPONSE']._serialized_end=2146
64
+ _globals['_DOWNLOADURLRESPONSE']._serialized_start=2148
65
+ _globals['_DOWNLOADURLRESPONSE']._serialized_end=2182
66
+ _globals['_SHARELINKRESPONSE']._serialized_start=2184
67
+ _globals['_SHARELINKRESPONSE']._serialized_end=2226
68
+ _globals['_FILELISTRESPONSE']._serialized_start=2228
69
+ _globals['_FILELISTRESPONSE']._serialized_end=2273
70
+ _globals['_EMPTY']._serialized_start=2275
71
+ _globals['_EMPTY']._serialized_end=2282
72
+ _globals['_FILESERVICE']._serialized_start=2285
73
+ _globals['_FILESERVICE']._serialized_end=2986
74
74
  # @@protoc_insertion_point(module_scope)
@@ -77,6 +77,7 @@ message UploadCompletedRequest {
77
77
 
78
78
  message DownloadUrlRequest {
79
79
  string file_id = 1;
80
+ optional bool is_cdn = 3;
80
81
  optional int32 expire_seconds = 2;
81
82
  }
82
83
 
@@ -504,6 +504,7 @@ class AsyncBlobService(BaseFileService):
504
504
  self,
505
505
  file_id: str,
506
506
  *,
507
+ is_cdn: Optional[bool] = True,
507
508
  expire_seconds: Optional[int] = None,
508
509
  request_id: Optional[str] = None,
509
510
  **metadata
@@ -513,6 +514,7 @@ class AsyncBlobService(BaseFileService):
513
514
 
514
515
  Args:
515
516
  file_id: 文件ID
517
+ is_cdn: 是否返回CDN的URL
516
518
  expire_seconds: 过期时间(秒)
517
519
  request_id: 请求ID(可选,如果不提供则自动生成)
518
520
  **metadata: 额外的元数据(如 x-org-id, x-user-id 等)
@@ -524,7 +526,7 @@ class AsyncBlobService(BaseFileService):
524
526
 
525
527
  stub = await self.client.get_stub(file_service_pb2_grpc.FileServiceStub)
526
528
 
527
- request = file_service_pb2.DownloadUrlRequest(file_id=file_id,
529
+ request = file_service_pb2.DownloadUrlRequest(file_id=file_id, is_cdn=is_cdn,
528
530
  expire_seconds=expire_seconds if expire_seconds else None)
529
531
 
530
532
  # 构建元数据
@@ -502,6 +502,7 @@ class SyncBlobService(BaseFileService):
502
502
  self,
503
503
  file_id: str,
504
504
  *,
505
+ is_cdn: Optional[bool] = True,
505
506
  expire_seconds: Optional[int] = None,
506
507
  request_id: Optional[str] = None,
507
508
  **metadata
@@ -511,6 +512,7 @@ class SyncBlobService(BaseFileService):
511
512
 
512
513
  Args:
513
514
  file_id: 文件ID
515
+ is_cdn: 是否返回CDN的URL
514
516
  expire_seconds: 过期时间(秒)
515
517
  request_id: 请求ID(可选,如果不提供则自动生成)
516
518
  **metadata: 额外的元数据(如 x-org-id, x-user-id 等)
@@ -522,7 +524,7 @@ class SyncBlobService(BaseFileService):
522
524
 
523
525
  stub = self.client.get_stub(file_service_pb2_grpc.FileServiceStub)
524
526
 
525
- request = file_service_pb2.DownloadUrlRequest(file_id=file_id,
527
+ request = file_service_pb2.DownloadUrlRequest(file_id=file_id, is_cdn=is_cdn,
526
528
  expire_seconds=expire_seconds if expire_seconds else None)
527
529
 
528
530
  # 构建元数据
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tamar-file-hub-client
3
- Version: 0.0.9
3
+ Version: 0.0.10
4
4
  Summary: A Python SDK for gRPC-based file management system
5
5
  Home-page: https://github.com/Tamar-Edge-AI/file-hub-client
6
6
  Author: Oscar Ou
@@ -13,13 +13,13 @@ file_hub_client/rpc/generate_grpc.py,sha256=opzstxWdW7vqR9OxrgUCSUkZe8IqgcOdruqW
13
13
  file_hub_client/rpc/interceptors.py,sha256=UeQ8u-olMiYwScXJrlzqPS-odGomH-h3xJqOwPznRUo,22071
14
14
  file_hub_client/rpc/sync_client.py,sha256=ZWBmP-TU8eeAfl2lV8sLu9nsxo_aOPAVmt9ww_T8Hwg,14054
15
15
  file_hub_client/rpc/gen/__init__.py,sha256=NJLqr9ezUXeOyy1J0sMPn3Kl_8IyGw7GAzzzewO3MIw,45
16
- file_hub_client/rpc/gen/file_service_pb2.py,sha256=7zEL8RFMp9gcigEqWnZFREX8ylljfQzBHwg43SbKt-A,8354
16
+ file_hub_client/rpc/gen/file_service_pb2.py,sha256=_0OKjhzI82aW71bRji4W6RK2yYHqbFlZgYtOBL-VxVM,8425
17
17
  file_hub_client/rpc/gen/file_service_pb2_grpc.py,sha256=D-vs_udh-8YK2wxSClIKGVNdYFGg40IYMiLVkwe8QOs,20723
18
18
  file_hub_client/rpc/gen/folder_service_pb2.py,sha256=OPNYHThmL1k2KH1ll2L_Gj76oWBWqcymXKHu8mk1Zvk,4126
19
19
  file_hub_client/rpc/gen/folder_service_pb2_grpc.py,sha256=pOHFsVThdAu5DAKd8QK3_zQvUmFgGlh4KBqIYnYDZ_U,10411
20
20
  file_hub_client/rpc/gen/taple_service_pb2.py,sha256=08TRlox7hxH2F_T-_0AgoV1xT2KIK9GrCUMkz-ZKxeo,48062
21
21
  file_hub_client/rpc/gen/taple_service_pb2_grpc.py,sha256=DCL-45PlEZ0guLz1u2fFH_sDIT_awuSvp9Ak6fa2GO8,64773
22
- file_hub_client/rpc/protos/file_service.proto,sha256=9ivrzcaU7kiTyh4h_v7LvQqiPcLZTgXS88Kgo6y4WYI,3663
22
+ file_hub_client/rpc/protos/file_service.proto,sha256=I0Px8pYmNERwnUECIuBEe_RAe4KUByEJ4d6K_8iDFFs,3694
23
23
  file_hub_client/rpc/protos/folder_service.proto,sha256=cgIbJT2slXMMRGrtrzN3kjae9-4CB1zXCmceiUgE6fI,1542
24
24
  file_hub_client/rpc/protos/taple_service.proto,sha256=sBCSECCFXamdMg65Jij29OFYlQSQGGFxwHJXq1FXpug,29639
25
25
  file_hub_client/schemas/__init__.py,sha256=kA0jUV5C3EBZxXWd80hHiMvJw0KL068EintZJx-vkJw,2100
@@ -29,10 +29,10 @@ file_hub_client/schemas/folder.py,sha256=D7UFsLCou-7CCXCQvuRObaBQEGmETsm1cgGOG1c
29
29
  file_hub_client/schemas/taple.py,sha256=qoH458xMAdYg8_jKdYqHJy5-gZ1ZFzOAkSPFROQuhQI,18172
30
30
  file_hub_client/services/__init__.py,sha256=yh5mir0dKB_LtJMk2hTpQI9WSlguaxtVD2KomMnzxdM,514
31
31
  file_hub_client/services/file/__init__.py,sha256=aJygo_AzYk5NN-ezp-a9YlugJ82wVIP9e5e54fl0UsI,342
32
- file_hub_client/services/file/async_blob_service.py,sha256=ccpEBKf5GOE3RxR9hSWcCn5SpQi1oTVxMpcIV4uUHt8,20478
32
+ file_hub_client/services/file/async_blob_service.py,sha256=kIsz-tGDLgmk4J5I-h95Aummz1UPo55ffy5vIAFQxaU,20578
33
33
  file_hub_client/services/file/async_file_service.py,sha256=QxVfwPoJe_oj8t7EOLHMQF3PQf4E1-HctQR7yvY9D3g,8585
34
34
  file_hub_client/services/file/base_file_service.py,sha256=wTxplrTk9klfwIHOPfTL0TQd6gX4nEmkYtIhpiZ3GVo,4791
35
- file_hub_client/services/file/sync_blob_service.py,sha256=WPfpuQ5-3b5crmgjqdxsGKqz5SvX_P0Iy_8TfO2X6BU,20259
35
+ file_hub_client/services/file/sync_blob_service.py,sha256=I2_fcdpE6jyZ4Bs7-zWzr5PhWWPMfKQLcYMuYV2cDiE,20359
36
36
  file_hub_client/services/file/sync_file_service.py,sha256=i1pLCcGNWMlWQfAW4dlhLsEiV3oc1jXKmKax35k0CGw,8439
37
37
  file_hub_client/services/folder/__init__.py,sha256=vGbMOlNiEBdnWZB1xE74RJtoroI28hKHCWfQV1GqKQc,210
38
38
  file_hub_client/services/folder/async_folder_service.py,sha256=uFEmtW8EXYvaKYT2JCitWbdTGR1EtHlx_eBN5P3JUZg,7293
@@ -51,7 +51,7 @@ file_hub_client/utils/logging.py,sha256=IxcvWkA0G9s9BMiXIeFAdJX5G-Lc5-JFlS2yxOX1
51
51
  file_hub_client/utils/retry.py,sha256=A2MBdJCEY-Ks0guq8dd5wXX22sD27N30Qy3nQIW1B_s,18019
52
52
  file_hub_client/utils/smart_retry.py,sha256=RjBhyG6SNDfMXxNxKU_qayWDD6Ihp7ow6_BPjhgflM0,16465
53
53
  file_hub_client/utils/upload_helper.py,sha256=gEtn9OXVJiGUpVev_fqrDnRQ6AFiiP9goLzFrVpqXmU,22569
54
- tamar_file_hub_client-0.0.9.dist-info/METADATA,sha256=9YI1K_AMsIfOeiwYrIeSAwB5NvXzrQlbT7sPCXDTygw,64873
55
- tamar_file_hub_client-0.0.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
56
- tamar_file_hub_client-0.0.9.dist-info/top_level.txt,sha256=9wcR7hyAJQdJg_kuH6WR3nmpJ8O-j8aJNK8f_kcFy6U,16
57
- tamar_file_hub_client-0.0.9.dist-info/RECORD,,
54
+ tamar_file_hub_client-0.0.10.dist-info/METADATA,sha256=Y13VzLkI8Z9yMtQ-VJm_Bp-7CtluviM-LH6kzngS1nI,64874
55
+ tamar_file_hub_client-0.0.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
56
+ tamar_file_hub_client-0.0.10.dist-info/top_level.txt,sha256=9wcR7hyAJQdJg_kuH6WR3nmpJ8O-j8aJNK8f_kcFy6U,16
57
+ tamar_file_hub_client-0.0.10.dist-info/RECORD,,