More in this section

Forums / General Discussions / Direct File Linking

Direct File Linking

2 posts, 0 answered
  1. AFTR
    AFTR avatar
    22 posts
    Registered:
    05 Oct 2010
    21 Nov 2011
    Link to this post
    I have an application where users use custom controls to upload document to various "Documents and Files" libraries in Sitefinity. For instance, we have a document called "test-document.docx" which we upload to "test-library".

    The control also provides links to the users to download the files.

    For instance, a link to the above document might be something like....

    http://www.mydomain.com/docs/test-librar/2011/11/21/test-document.docx

    The problem is, when I take this link, and try to access it when I am logged out, the document still downloads, when it should deny the anonymous user access.

    I have locked down the permissions of the document libraries, and also tried locking down the permissions of the individual document, but with no success.
  2. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    Registered:
    28 Aug 2017
    24 Nov 2011
    Link to this post
    Hello,

    Can you please let us know if the same behavior reproduces when using the Sitefinity Download list widget? If you need to display the links only to authenticated users, maybe you could do a check inside your code for:
    if(!HttpContext.Current.User.Identity.IsAuthenticated)
    {
      //do not render link
    }
    Looking forwards to your reply.

    Kind regards,
    Boyan Barnev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered