Try Now
More in this section

Forums / General Discussions / Storing images in the DB

Storing images in the DB

2 posts, 0 answered
  1. Steve
    Steve avatar
    3037 posts
    03 Dec 2008
    20 Dec 2009
    Link to this post
    I just had a friend email me, apparently his host killed his SQL instance because he ran over his max DB limit...they're storing a lot of image in the Library

    Is there a way to extract those to the filesystem and have the same functionality?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    19 Oct 2016
    20 Dec 2009
    Link to this post
    Hi Steve,

    There is a way to get the images from a library. You can use LibraryManager.GetLibrary and ILibrary object. Then you need to create an image using System.IO.MemoryStream and System.Drawing.Image using the data provided from LibraryManager. There is no built-in functionality for storing items in the file system. You can find the following post useful - physical upload of images and documents. Here the idea is that you are storing only the metadata of a content item in the database, since the actual file size is stored in the file system.

    I hope that this helps.

    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
2 posts, 0 answered