Skip to main content

UploadPresignedUrlsGetParams Objects

class UploadPresignedUrlsGetParams(BaseDTO)
Parameters for requesting presigned URLs for file uploads.

count

Number of presigned URLs to request, typically matching the batch size of files.

upload_item_type

The type of item being uploaded (e.g., IMAGE, VIDEO, AUDIO, DICOM).

upload_to_signed_url_list

def upload_to_signed_url_list(
        file_paths: Iterable[Union[str, Path]], config: BaseConfig,
        api_client: ApiClient, upload_item_type: StorageItemType,
        cloud_upload_settings: CloudUploadSettings) -> List[Dict]
Upload multiple files to signed URLs and return upload results. Arguments:
  • file_paths Iterable[Union[str, Path]] - Paths of files to upload.
  • config BaseConfig - Configuration object with request settings.
  • api_client ApiClient - API client used to fetch presigned URLs.
  • upload_item_type StorageItemType - Type of items being uploaded.
  • cloud_upload_settings CloudUploadSettings - Upload configuration.
Returns:
  • List[Dict] - A list of dictionaries containing upload metadata:
    • data_hash (str): Unique identifier for the file.
    • file_link (str): Link to the uploaded file in storage.
    • title (str): File name or title.
Raises:
  • EncordException - If any file path does not exist.
  • CloudUploadError - If uploads fail and allow_failures is False.