libManager.CreateImage..creating thumbnails

Posted by Community Admin on 03-Aug-2018 21:27

libManager.CreateImage..creating thumbnails

All Replies

Posted by Community Admin on 09-Jun-2011 00:00

Does anyone from any code on setting a thumbnail as you call the CreateImage method?  I am able to upload the new image, etc... 

Thanks in advance for your help

Posted by Community Admin on 14-Jun-2011 00:00

Hi Harry,

If you use the Upload method of LibrariesManager you will be able to automatically get a thumbnail generated. Bellow is the method signature:

/// <summary>
/// Uploads the specified content.
/// </summary>
/// <param name="content">The content.</param>
/// <param name="source">The source.</param>
/// <param name="extension">The extension.</param>
public virtual void Upload(MediaContent content, Stream source, string extension)

So first you call the CreateImage method. This will give you a new instance of Image type. Then you need to upload the content to it. This means that you need to call the Upload method and pass the newly created image object, the source parameter (can be FileStream) and the extension.

Greetings,
Radoslav Georgiev
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed