prepare_image_asset
- omni.nvcf.core.prepare_image_asset(session: urllib3.poolmanager.PoolManager, token: str, asset_name: str, asset_data: str, nvcf_url: str = NVCF_URL.STG) str
Helper to create and then upload asset data with an asset name. Provides the generated asset ID as output. Assumes “application/octet-stream” data to upload encoded image bytes.
- Parameters
session (urllib3.PoolManager) – Client session.
token (str) – JWT authorization token.
asset_name (str) – Name given to the asset when created.
asset_data (Any) – Raw data to upload.
nvcf_url (str, optional) – URL for NVCF calls. Defaults to util.NVCF_URL.STG.
- Returns
ID of the created asset.
- Return type
str