Tag Archives: MediaItem

Stream Sitecore media items to HttpResponse

Here is a small tip for you who is doing API’s based on Sitecore. How to get an item from the Sitecore Media Library and stream it to the HttpResponse of a page. This is an example of an .ashx … Continue reading

Posted in .net, c#, Sitecore 7 | Tagged , , , | Leave a comment

Replacing mediaitems in Sitecore

This tip is from one of my colleagues Frederik Örnfelt who read my post about Adding a file to the Sitecore Media Library. But instead of adding files, he simply wanted to replace one item with another. Replacing media items … Continue reading

Posted in .net, c#, General .NET, Sitecore 6 | Tagged , , , | Leave a comment

Get Media Item file size

I recently worked at a project where I need to return the file size of the selected media item. It is actually very simple, as Sitecore has encapsulated the media item in a Sitecore.Data.Items.MediaItem class. This class contains the default … Continue reading

Posted in Sitecore 6 | Tagged , | Leave a comment