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.
When using Drupal 7 with the private download set as default, File Styles preview fails as the file is not accessible by the system.
If I do an "open image in new window" from the preview to check the image, you get an "Access Denied", I imagine because the image file is unmanaged and thus Drupal 7 cannot authorize it.
Comment | File | Size | Author |
---|---|---|---|
file_styles_when_set_to_privaye.jpg | 43.35 KB | 3rdLOF |
Comments
Comment #1
wjaspers CreditAttribution: wjaspers commentedsubscribe
Comment #2
wjaspers CreditAttribution: wjaspers commentedActually, it looks like the file_styles_variable_get() call is asking for a system variable that doesn't exist (preview_image_directory).
I took a peek over my database, and none of the variables requested in the code below are defined anywhere in the database.
Here's where I suspect the code is tripping up. file_styles.module line 80.
Comment #3
TribalMan CreditAttribution: TribalMan commentedI am seeing something similar. It appears that the module is trying to write to the wrong directory.
When File System is set to Private upload I get this problem. When set to public, there is no problem. If I look at the directories used by styles it has not written any "private" folders in its directories, only public... i.e. lots of write access errors
It keeps trying to write here
When it should be writing and reading here:
Comment #4
matrobin CreditAttribution: matrobin commentedsubcribe