upload_files
imerit_ango.sdk.SDK.
upload_files(project_id, file_paths, storage_id, batches, priority)
Upload local files to your project.
Parameters
project_id: string
The unique identifier for the project. You can find the project ID in the user interface or retrieve it using the
list_projectsfunction.
file_paths: List[str]
A list containing absolute paths to files and, optionally, their contextData.
Example:
[
{
"data": "/Users/lorenzo/Desktop/Gassino,_arrival_of_tramway_auto_x2.jpg",
"metadata": {
"width": 1500,
"height": 1200
},
"contextData": {
"key1": "value1"
}
}
]storage_id: string, Optional, default None
This parameter has no function anymore and will be deprecated in the next version of the SDK.
batches: List[str], Optional, default None
You may assign the files you are uploading to one or more batches that exist in your project by providing their IDs here. You may create new batches with create_batch and you can get a list of batches with get_batches.
Example:
['0000000aa0a00a0000aaaa0a', '0000000aa0a00a0000aaaa0b']
priority: int, Optional, default 0
The new priority value to assign to the uploaded assets.
Note: The priority value must be between -1000 and 1000. Higher values indicate higher priority.
Returns:
output: dict
A dictionary containing the result of the operation.
Including a
statusfield indicating whether the request was successful and adatafield containing the response payload with updated resources produced by the operation.
Example
Importing two local files:
Importing a file with a custom external ID:
Last updated

