@abrar wrote:
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) const assetResource = new KalturaAssetResource({ assetId: thumbAssetId, uploadedFileTokenResource } as KalturaAssetResourceArgs) const updateContentAction = new ThumbAssetSetContentAction({ id: thumbAssetId, contentResource: assetResource, } as ThumbAssetSetContentActionArgs); client.request(updateContentAction).subscribe((thumb: KalturaThumbAsset) => { console.log('Updated thumb', thumb); }); }); }); }
I am setting
KalturaAssetResource
toThumbAssetSetContentAction.contentResurce
which throws this error
[KalturaFrontController->getExceptionObject] ERR: exception ‘KalturaAPIException’ with message ‘File doesnt exist’ in /opt/kaltura/app/api_v3/lib/types/resource/KalturaAssetResource.php:40
If i set
KalturaContentResource
toThumbAssetSetContentAction.contentResurce
according to the documentation then i get this error
[KalturaFrontController->getExceptionObject] ERR: exception ‘KalturaAPIException’ with message ‘The object type “KalturaContentResource” is abstract, use one of the object implementations’ in /opt/kaltura/app/api_v3/lib/KalturaRequestDeserializer.php:281
KalturaContentResource
is indeed an abstract classI checked the permissions on tmp folder, all is ok. I even set it to 777 just in case.
Please let me know if it is the correct way, BTW i can upload new thumbnails just fine.
Thanks
Posts: 1
Participants: 1