Jump to:

5540 Posts in 1738 Topics by 1224 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Password protected downloads (i.e., secure assets)

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 2271 Views
  • HansR
    Avatar
    Community Member
    140 Posts

    Password protected downloads (i.e., secure assets) Link to this post

    Is there any way to have files or a directory of files inside the assets directory that can only be downloaded after the user has logged in? I have seen one or two people asking this question, but no solutions so far.

    A default Silverstripe install allows direct download of the files via the .htaccess configuration. My web host allows secure folders to be created, but how would the users and groups of the server be matched to Silverstripe's users/groups so that logging in gives access to those files? Having to log in via basic HTTP authentication would look ugly.

    Hans

  • Nivanka
    Avatar
    Community Member
    395 Posts

    Re: Password protected downloads (i.e., secure assets) Link to this post

    this can be done by adding the download like to a protected page.

    to do this create a new page, go to the access tab, change the

    Who can view this page on my site?

    to only logged in users.

  • MarijnKampf
    Avatar
    Community Member
    164 Posts

    Re: Password protected downloads (i.e., secure assets) Link to this post

    Please note adding the download to a password protected page does *not*make the download secure. If someone would forward the URL of the download - or say a search engine indexes it anyone can download the file.

    I haven't tested it yet, but http://www.silverstripe.org/installing-silverstripe/show/254742 seems to offer a solution.

    2271 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.