Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By stephthegeek on
I've got the private file system on because I need Drupal to be doing access control for media files. However, I can't seem to get avatars to display when it's set to private. They work when it's set to public.
It doesn't seem to work regardless of the upload directory being inside or outside public_html. The img tags are always showing the following source: //mydomain.com/system/files/pictures/picture-2.gif
Where is the /system coming from?? How can I fix this?
Comments
in file.inc
Okay... thanks... looks like
Okay... thanks... looks like that's where it's coming from. How do I get avatars working without breaking other stuff? I'm brand new to Drupal. I love it but I'm baffled that one of the two file systems wouldn't break something simple like this.
Yes, I know. I hope that
Yes,
I know. I hope that someone can shed some light on this because it also breaks CAPTCHA and some other items. I thought that private would just effect downloads from a certain folder that I put in. But it does the whole system. The warning next to the setting keeps me from playing with it too much.
I am wondering if you can set it to public (system) and then use the filemanager module to set certain folders to private?
Mysteriously fixed!
I was testing out file download products in the Ecommerce module, and I used an avatar that was already uploaded as my test product. Since then, all avatars are suddenly working. I tested uploading a new one as well and it all seems to be fine.
I'm not sure what this would have changed (permissions on the dir? but I had chmodded it previously), but I thought I would post this mysterious resolution.