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.
The /download path always returns access denied for all other users but user 1.
The logical thinking then is that there is some kind of permission that I havent set for anonymous users - but I really cannot figure out what it could be
I have obviously set the "media entity download" permission.
I've been digging into the code, and it appers that for all other users than UID1, this line in DownloadController.php returns a header array with a -1 value:
$headers = $this->moduleHandler()->invokeAll('file_download', [$uri]);
I guess this is a sign that the issue must not be with this module - but I was hoping someone would have an idea of why this is happening?
Comments
Comment #2
BerdirCheck implementations of that hook, are you using private files? are anonymous users allowed to view entities?
You will have to debug through that hook to figure out who is denying access. The result should be keyed by module, so that should give you an idea.