Quantcast
Channel: Kaltura - Latest posts
Viewing all articles
Browse latest Browse all 7410

thumbAsset.setContent throws an error

$
0
0

Hello, I am trying to update the content of thumbAsset

public updateThumbnailImage(thumbAssetId, fileData: File) {
    this.getClient().then((client: KalturaClient) => {
        const uploadAction = new UploadUploadAction({
            fileData: fileData
        } as UploadUploadActionArgs);

        client.request(uploadAction).subscribe((token: string) => {
            const uploadedFileTokenResource = new KalturaUploadedFileTokenResource({
                token: token
            } as KalturaUploadedFileTokenResourceArgs)

            console.log('Token', uploadedFileTokenResource);
            const updateContentAction = new ThumbAssetSetContentAction({
                id: thumbAssetId,
                contentResource: uploadedFileTokenResource,
            } as ThumbAssetSetContentActionArgs);

            client.request(updateContentAction).subscribe((thumb: KalturaThumbAsset) => {
                console.log('Updated thumb', thumb);
            });
        });
    });
}

I am getting this error

[API] [KalturaFrontController->getExceptionObject] ERR: exception ‘KalturaAPIException’ with message ‘Upload token not found’ in /opt/kaltura/app/api_v3/lib/types/resource/KalturaUploadedFileTokenResource.php:25

Stack trace:

#0 /opt/kaltura/app/api_v3/lib/types/resource/KalturaDataCenterContentResource.php(21): KalturaUploadedFileTokenResource->getDc()

Please let me know if it is the correct way, BTW i can upload new thumbnails just fine.

Thanks


Viewing all articles
Browse latest Browse all 7410

Trending Articles