More in this section

Forums / Developing with Sitefinity / File attachments in forum threads

File attachments in forum threads

4 posts, 0 answered
  1. Jay
    Jay avatar
    51 posts
    Registered:
    16 Jul 2008
    17 Mar 2010
    Link to this post
    I'm interested in allowing users to attach files when creating forum threads, similar to how Sitefinity.com's own forums work.  Is that code available somewhere? 
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    17 Mar 2010
    Link to this post
    Hi Jay,

    You need to create a custom implementation for the forum posts. You have to implement a button that will open a dialog with RadUpload control in it. Then if there is a file uploaded you need to save in a custom database table the post ID and some data for the uploaded file. Then each attachment could be a link to the file system directory where the file has been uploaded. Once an user clicks on the link he/she will be able to download/open the file.

    In Sitefinity when you are replying to an item you use  /Sitefinity/ControlTemplates/Forums/EditPost.ascx template. Here you need to implement the RadUpload control and process the data.

    The default module uses RadEditor control, so another option is using the built-in dialogs for inserting  Images and Documents where you can upload and link to items.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Jay
    Jay avatar
    51 posts
    Registered:
    16 Jul 2008
    17 Mar 2010
    Link to this post
    Thanks... I figured it was something along those lines.  I'll start coding and post a follow-up question if I run into any snags.  I appreciate the help.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    17 Mar 2010
    Link to this post
    Hi Jay,

    Ok, let me know if there are any problems/questions.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Register for webinar
4 posts, 0 answered