More in this section

Forums / Developing with Sitefinity / Does Sitefinity automatically persist images?

Does Sitefinity automatically persist images?

2 posts, 0 answered
  1. Dan Sorensen
    Dan Sorensen avatar
    256 posts
    Registered:
    13 Aug 2010
    31 Aug 2011
    Link to this post
    In the Sitefinity 4.2 Developer's Guide there is a note regarding control properties that says:

    NOTE: Sitefinity automatically handles persistence in the background. The private backing field serves only as the default value of the NewsLimit property.

    Source:
    http://www.sitefinity.com/40/help/developers-guide/how-to-how-to-create-a-newsrotator-control-creating-the-newsrotator-as-a-custom-control-implementing-the-features-of-the-control.html

     My question: Does/Can Sitefinity persist image files? (or just text values?) For example, can an editor upload an image into/for a control and have that image file be automatically persisted as well as the rest of the control data, or will that image uploading need to be handled separately from the rest of the control data?
  2. Lubomir Velkov
    Lubomir Velkov avatar
    688 posts
    Registered:
    03 Nov 2014
    02 Sep 2011
    Link to this post
    Hello Dan Sorensen,

    If you want to upload an Image then you should probably use the ImageField control. Basically all field controls inherit from a base class and work seamlessly - so the image should be persisted automatically, as long as you set properly the required fields for the ImageField control - like AlbumId and BoundOnServer.

    All the best,
    Lubomir Velkov
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

2 posts, 0 answered