• 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

kingjavo

Active member
#1
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?

Thanks,

Javier
 

Brogan

XenForo moderator
Staff member
#2
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.
 

kingjavo

Active member
#5
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
</Files>
 

kingjavo

Active member
#6
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?
 

Brogan

XenForo moderator
Staff member
#7
It would need to be an attachment to fully obey permissions.

What I have suggested is a workaround for your situation.