I created a content type with 4 fields on it:
- Private Image Field
- Public Image Field
- Private File Field
- Public File Field
I am able to access 1 and 2, as they are image fields. But if I upload an image to the normal file field, then I get access denied when I try to access it.
I tried imlementing hook_file_download but it's not even triggering it for a normal file field.
What could I be missing?
I checked the file_managed table and the uri field has this:
When I changed it to this:
Any idea why my Drupal would be saving the file like this?
The problem might be related to the filefield paths module. I even updated it to the latest dev version, but no luck. The only workaround I could find was to leave out the "file path" value. So that it wont add the file to the folder "p". I can at least carry on now, but it would've been great if it could work with folders as it is intended to.