upload_files_cloud
imerit_ango.sdk.SDK.
upload_files_cloud(project_id, assets, storage_id, batches)
Import files in cloud storage to Ango Hub. Check Importing Assets for more information.
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_projects
function.
assets: List[string]
A list of asset dictionaries in the [{"data": <URL>, "externalId": "<external_id>"}] format.
Assets uploaded with this method can also contain attachments, batches, metadata, and contextData.
For image and video attachments, you may provide links to assets in private buckets, provided that you've connected them to Ango Hub. More information on how to do so can be found on the Attachments page.
For Markdown assets, you may directly include the Markdown file as plain text in the data
field, like so:
Batches you specify in the assets dictionary will override the batches you specify in the batches parameter of this function.
storage_id: string, Optional, default None
If importing files from a private bucket previously integrated with Hub, this parameter is necessary. This is the ID of the bucket's integration, obtainable from
get_storages
function.
batches: List[string], Optional, default None
You may add the files being uploaded to one or multiple batches, by passing a list of batch IDs. You may obtain a list of batch IDs available in your project using
get_batches
function, or create new ones usingcreate_batch
function.
Returns:
output: dict
Examples
Importing a file from a public bucket, and assigning it to a batch:
Importing a file from a private bucket, and assigning it to multiple batches:
Last updated