1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 How to Create Page to Download File on Server

Discussion in 'XenForo Questions and Support' started by kingjavo, May 25, 2015.

  1. kingjavo

    kingjavo Member

    I want to host a large file that I cannot attach per my host's requirements and they recommended hosting it on the server with a link on my site.

    Anyone know how to do this? Can I set permissions on the page/file?


  2. Brogan

    Brogan XenForo Moderator Staff Member

    You could just upload the file and then post the link in a thread or page node.

    If you protect the directory with .htaccess authorisation and set user group permissions on the thread/page, that would more or less achieve the same thing as attaching a file.
  3. kingjavo

    kingjavo Member

    Any links on how to protect the directory with .htaccess authorisation?
  4. Brogan

    Brogan XenForo Moderator Staff Member

  5. kingjavo

    kingjavo Member

    Ok so if I created a new folder in the root called "Downloads" and the file is a zip file, what do I put in place of "admin.php"?

    <Files admin.php>
    AuthType Basic
    AuthName "ACP"
    AuthUserFile "path/to/passwd/file"
    Require valid-user
  6. kingjavo

    kingjavo Member

    Yea, I'm trying to just make the folder require a user to be logged with at least "Registered" status.

    This seems to password protect the file/directory. Any way to accomplish this?
  7. Brogan

    Brogan XenForo Moderator Staff Member

    It would need to be an attachment to fully obey permissions.

    What I have suggested is a workaround for your situation.
  8. kingjavo

    kingjavo Member

    Ok thanks for the help! :)

Share This Page