Closed (fixed)
Project:
Private Upload
Version:
6.x-1.0-rc2
Component:
Miscellaneous
Priority:
Minor
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
27 Aug 2009 at 02:06 UTC
Updated:
21 Sep 2010 at 05:42 UTC
I have installed the module and am getting green confirmation messages from all of the configuration settings under Site Config | Private Upload, so I think things are generally correctly configured.
However, I am receiving the message below when I try to access a file as an authenticated user with permissions on the node where the file is attached. Seems like something isn't configured right.
Forbidden
You don't have permission to access /sites/default/files/private/Tip Sheet 4 Interview Prep for TV_1.pdf on this server
--------------------------------------------------------------------------------
Apache/2.2.9 (Fedora) Server at staging.xxxx-011.xxxxx.com Port 80
Comments
Comment #1
vuzzbox commentedI figured this out. It might be helpful for someone else to know what was happening.
I am using a content template to present file access. In the template, I was pulling the $file->filepath value from the node. By default, this was pointing to the /sites/default/files/private/Tip Sheet 4 Interview Prep for TV_1.pdf path referenced above. Of course, that path behaves as it should and blocks access.
I did an str_replace on the path so that it was pointing to /system/files/private/Tip Sheet 4 Interview Prep for TV_1.pdf instead and it all works as designed.
Comment #2
morthylla commentedThank you! Your solution worked as a charm!
Comment #3
beckyjohnson commentedCan you give me an example of your str_replace? I am having this same issue.
This is my code on my template
Just to add, if i am logged out, I can use this form and log in and get the file. If I am already logged in, then I get a forbidden error.