Replace an image Item for an entry

1 reply [Last post]
Joined: 10/14/2011
Points: 6

Hi ,
I am trying to replace an image item for an entry.
I am able to update the name of an entry with the following code.

        if(isset ($kaltura->media) )
        {
            $entryId = $id;
 //         updating the content info
            $mediaEntry = new KalturaMediaEntry();
            $mediaEntry->name = $name ;
            $mediaEntry->categories = $categories;
            $results = $kaltura->media->update($entryId, $mediaEntry);
            $updated = true;
        }

when I upload the image with the following code. It is not working

if(isset ($kaltura->media) )
                {
                                $entryId = $contentId;
                                $conversionProfileId = '-1';
                                $uploadFile = $uploadedFilepath;
                                $results = $kaltura->media->updateContent($entryId, $uploadFile, $conversionProfileId);
                }

Thanks in advance for any help or suggestion.

Joined: 01/05/2009
Points: 1697

Are you trying to replace an Image Entry or a thumbnail of a Video Entry?