upload_related
Upload a related asset (e.g. a proxy) onto an existing asset.
upload_related
Upload a related asset (e.g. a proxy) onto an existing asset.
Attach a related file (such as a proxy/poster) to an existing asset.
Safety class: A · API type: admin · Min version: —
Confinementexisting_asset_id must be within your run-root anchor.
Signatures
def upload_related(sdk, existing_asset_id, file, metadata_type=None):
"""Upload a related asset onto existing_asset_id; return the response dict."""
return sdk.upload_related_asset(existing_asset_id, None, metadata_type, "replace", file)export async function uploadRelated(sdk, existingAssetId, file, metadataType = null) {
// Attach a related file (proxy/poster) to an existing asset.
return await sdk.uploadRelatedAsset(existingAssetId, null, metadataType, "replace", file);
}Parameters
| Parameter (Python) | Parameter (JS) | Type | Required | Notes |
|---|---|---|---|---|
sdk | sdk | Nomad_SDK | yes | |
existing_asset_id | existingAssetId | str | yes | the asset to attach the related file to |
file | file | str | yes | e.g. /abs/path/proxy.png |
metadata_type | metadataType | str | None | no | related-asset metadata type to create, if any |
Returns
dict | None — server response dict; None on failure
Errors
- 401 unauthenticated
- 404 existing asset not found
See also: Python ↔ JS naming map · Return shapes.
