tamar-file-hub-client 0.0.9__py3-none-any.whl → 0.0.11__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.
@@ -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
  # 构建元数据