More in this section

Forums / Developing with Sitefinity / Upload and Overwrite File via Select a Link Dialog

Upload and Overwrite File via Select a Link Dialog

3 posts, 0 answered
  1. Steven
    Steven avatar
    15 posts
    Registered:
    05 Jun 2008
    03 Dec 2008
    Link to this post

    I was able to enable the File Manager to overwrite existing files by following this KB Article. However, this configuration appears to apply only uploading files via the File Manager.

    Does anyone know if there is a way to enable the overwriting of files when Uploading Files from the "Select a Link" dialog?

    Example of what I'm trying to accomplish:

    1. While Editing Generic Content on a page, the CMS user Right Clicks on a link and chooses Set Link Properties

    2. The link currently points to a PDF file. The CMS user needs to Upload a new PDF with the same File Name to replace the current file

    3. The CMS user clicks the Select a page from the site option

    4. Then clicks on the Files tab

    5. The user then clicks on Upload Files button

    6. The user can select a new PDF with the Same File Name as the current published PDF file and Upload it to overwrite the existing file.

    Any help with how to do this would be greatly appreciated.

    Thanks,

    Steven

  2. Steven
    Steven avatar
    15 posts
    Registered:
    05 Jun 2008
    04 Dec 2008
    Link to this post
    Could anyone point me to which file would contain the RadUpload control for the "Select a Link" dialog?

    Steven
  3. valio b
    valio b avatar
    33 posts
    Registered:
    24 Sep 2012
    10 Dec 2008
    Link to this post
    Hi Steven,

    The File uploader within the Link Manager you are referring to, is actually a UrlWebEditor control, which can be accessed in ~/Sitefinity/Admin/ControlTemplates/Pages/Dialogs/PagesSelector.ascx template:

    <div id="fileManagerWrapepr"
            Start urlWebEditor 
            <cc:UrlWebEditor id="urlWebEditor" runat="server"/> 
            End urlWebEditor 
    </div> 

    You can override this control to behave in a manner which is relevant to your requirements. After that, in the template, you should substitute UrlWebEditor control with the one you have implemented.

    Hope, this will get you going.

    All the best,
    valio b
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Register for webinar
3 posts, 0 answered