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.
In the filed image properties, if I set it to upload images in private folder, images are viewable only by his owner, administrators can't view them even if they could.
(Anyway, great module! I hope in a stable release soon!!!)
Issue fork multifield-2217045
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #1
Dave ReidConfirmed the bug. Looks like we're going to need to copy what file_file_download() does for anything inside a multifield.
Comment #2
Dave ReidBTW I added a 'Known issues' on https://drupal.org/project/multifield for this issue.
Comment #3
slayne40 CreditAttribution: slayne40 commentedHy,
To define access to private files, Drupal uses the "file_download" function and "hook_file_download"...
And more precisely "file_file_download" function.
No information is returned if the field is "multifield" type.
Create the "multifield_file_download" so that it returns the correct values.
Comment #6
MustangGB CreditAttribution: MustangGB commentedThere are many different way of writing this.
Here is a version that tries to keep it as close to the original as possible, whilst supporting both files and images.
It's worth noting that
multifield_get_file_references()
returns the multifield's parents references rather than the subfield's parent references (i.e. the multifield). For example a subfield in a multifield in a node will return a list of nodes rather than a list of multifields.