Modifying Blog Posts to allow file uploading
Hi everyone,
I am pretty new to Sitefinity and am currently working with Sitefinity 5.1. I am trying to add a custom field to the Blog Posts Content Type to allow a user to use the file selector control to upload a file along with their blog post. Does anyone know how, or even if that functionality is available? If anyone could get back to me I would greatly appreciate it.
Gianluca
Hello Gianluca,
At the moment we do not have a sample on how to upload a file ( for example a document ) to a module because this is not implemented as a definition element in the Sitefinity module.
To upload a document refer to this sample that can either be added as a new custom field that will select the document or it can be integrated to the module and used as definition element that will select a document.
In the selector change the services to use document selector service
<sf:MediaContentSelectorView CssClass="sfContentViews imageSelector" id="leftSlideLogoImageSelector" runat="server" ContentType=Telerik.Sitefinity.Libraries.Model.Document ParentType=Telerik.Sitefinity.Libraries.Model.DocumentLibrary LibraryBinderServiceUrl="~/Sitefinity/Services/Content/AlbumService.svc/" MediaContentBinderServiceUrl="~/Sitefinity/Services/Content/ImageService.svc/" MediaContentItemsListDescriptionTemplate="Telerik.Sitefinity.Resources.Templates.Designers.Libraries.Images.ImageItemDescriptionTemplate.htm" DisplayResizingOptionsControl="false" ShowOpenOriginalSizeCheckBox="false"> </sf:MediaContentSelectorView>This will select document from Sitefinity document library.
Greetings,