# Function uploadAsset

- uploadAsset(collectionId, productId, proofId, file, extraData?, onProgress?): Promise<AssetResponse>

- Uploads an asset file to a proof, with optional extraData as JSON. Supports progress reporting via onProgress callback (browser only).

  #### Parameters

  - collectionId: string

    The collection ID

  - productId: string

    The product ID

  - proofId: string

    The proof ID

  - file: File

    The file to upload

  - `Optional` extraData: Record<string, any>

    Arbitrary extra data to include (will be stringified as JSON)

  - `Optional` onProgress: ((percent) => void)

    Optional callback for upload progress (0-100)

    - - (percent): void

      - #### Parameters

        - percent: number

        #### Returns void

  #### Returns Promise<AssetResponse>

  Promise resolving to an AssetResponse object

  - Defined in api/asset.ts:74