Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: file_download directory problems
Gocom -
Thanks for your reply…very interesting! I have a client who is selling a subscription to an “e-course”. Along with emails, she wants to make some pdfs available for download to those who have purchased. You mention:
- storing the files outside of the web root – but anyone with the proper link could still access it, right?
- using plugins to protect downloads – can you suggest such a plugin?
Many thanks!
Offline
Re: file_download directory problems
nabrown78 wrote:
- storing the files outside of the web root – but anyone with the proper link could still access it, right?
- using plugins to protect downloads – can you suggest such a plugin?
Yes, everyone with a proper TXP’s download link could access the files. The only plugin that comes to my mind is ign_password_protect. It has some features for protecting files.
Offline
#18 2010-09-29 19:30:00
- coleyparka
- New Member
- Registered: 2009-10-13
- Posts: 8
Re: file_download directory problems
Hi all
I seem to have inherited a similar problem to the one detailed in the first post in this chain. I’m no txp expert by any stretch, but I’ve been asked to add a downloads section to an active website which has been running on textpattern for a number of years (I had no involvement with the original configuration and have no contact with the person who originally built the site unfortunately). I can upload files to the “files” directory and edit them but get a “file not found” error whenever I try to download. The site seems to be successfully using clean URLs – there’s a plugin called zem_rewrite running and all the pages have human-readable URLs. The path to the files folder seems to be correct in the site preferences. I’m at a bit of a loss here, so any help would be much appreciated.
Cheers!
Offline
#19 2010-09-29 21:45:19
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: file_download directory problems
coleyparka wrote:
I can upload files to the “files” directory
Did you ‘import’ them in the Files tab as well? (see here)
If you did and it still doesn’t work, can you give an example of what a URL that returns the ‘file not found’ looks like?
I must say I’m not familiar with zem_rewrite, so I don’t know if and how that might interfere.
Offline
#20 2010-09-30 08:28:20
- coleyparka
- New Member
- Registered: 2009-10-13
- Posts: 8
Re: file_download directory problems
Yes, I did import via the files interface in textpattern rather than by ftp. Textpattern sees the files from the back-end, I can go in and edit them etc but when I click download (from the back or front end) I get this message:
The page you requested, file_download/3/Reverse-Booklet.pdf, was not found.
A typical url for file not found would be this:
http://example.com/file_download/3/Reverse-Booklet.pdf
The files folder is fully read/write, and I’ve also tried creating a different directory and pointing textpattern to that but I get the same result – works fine for import and edit but not for download.
Any help much appreciated.
Thanks
Offline
#21 2010-09-30 16:55:45
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: file_download directory problems
Have you tried if it works when you de-activate zem_rewrite?
Offline
#22 2010-10-01 08:34:33
- coleyparka
- New Member
- Registered: 2009-10-13
- Posts: 8
Re: file_download directory problems
Hi
Thanks for that suggestion – it seems to have worked, but not properly. Some files appear on the front end and download fine, but others don’t appear at all now. Do files need particular naming conventions in order to be visible to textpattern? I’m loading to one category and they work and then to another category and they don’t work, even though the pages are effectively the same.
Cheers
Offline
#23 2010-10-01 11:50:50
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: file_download directory problems
coleyparka wrote:
I’m loading to one category and they work and then to another category and they don’t work,
In that case it might be the tag that is used to display the files. Can you post it?
Offline
#24 2010-11-02 13:25:36
- woof
- Member

- Registered: 2004-08-01
- Posts: 128
Re: file_download directory problems
I’m having a problem with the paths in the generated tags from the tags links (textpattern, textile, xhtml) for file download when Textpattern is installed in a sub directory.
My sub directory is called 2010
The tags links in Content > Files generate paths like this
<a href="/file_download/15/filename.csv">filename.csv</a> i.e. pointing to the root
To work they should include the subfolder. i.e.
<a href="/2010/file_download/15/filename.csv">filename.csv</a>
I’m using the 4.3.0 release candidate. My site URL and file directory path appear to be correct so I cant figure out how to fix this…
Offline
Re: file_download directory problems
woof wrote:
I’m having a problem with the paths in the generated tags from the tags links (textpattern, textile, xhtml) for file download when Textpattern is installed in a sub directory.
crap. Didn’t spot graeme’s comment ‘cos I wasn’t subscribed to the topic. Thanks for highlighting this again. Will fix today.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
Re: file_download directory problems
Hello!
I don’t want to start a new topic with the same idea for my question.
My file_download link does not work either. I tested TXP sites on different servers I found that my server has PHP functions – link, symlink, proc_nice disabled. The same TXP file_download works on other server but not on mine. I dont see any other problem but this. I tried fresh installation in both cases.
Could you give me a hint what function is a “must” to enable file_download work? I guess it is link or symlink?
Last edited by admi (2014-01-16 07:06:26)
Offline
#27 2014-01-16 11:49:42
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,319
Re: file_download directory problems
admi wrote #278192:
I found that my server has PHP functions – link, symlink, proc_nice disabled.
There’s the FAQ on that subjet saying that these three aren’t used by TXP.
What about clean URLs? See the answers to the topic starter’s question.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: file_download directory problems
uli wrote #278199:
There’s the FAQ on that subjet saying that these three aren’t used by TXP.
What about clean URLs? See the answers to the topic starter’s question.
Yes, I know that symlink and link disabled according to txp diagnostics. But my point is that on the previous hosting the file like site.com/file_download/59/151.pdf worked ok. On the new hosting it does not but site.com/file_download/59/ works. I just want to write to the hosting support to ask them to turn on link or symlink. And I needed to know which one exactly. May be, it is a little unclear.
Offline
#29 2014-01-18 14:57:33
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,319
Re: file_download directory problems
admi, seems to me like this topic of today might be what you’re actually after.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: file_download directory problems
uli wrote #278268:
admi, seems to me like this topic of today might be what you’re actually after.
Thanx. I think you are right.
Offline