"0 usage" files can't be downloaded

Created on 19 December 2024, 4 months ago

Problem/Motivation

When a file has 0 usages in /admin/content/files, the download fails for all users with an 403 error.

This is mostly caused due the $header check in the controller, which itself is returned empty by core. (This last part is currently moving a lot in recent versions of core, from file.module to different src/Hook files, but the code is always the same)

But to my experience, the file usage tracking currently is still quite unreliable. E.g. we have lots of incorrect 0 usage PDF files from media document entities in multiple of our projects. And all those documents can't be downloaded with this module.

Proposed resolution

Remove the line with headers check if (count($headers))

Remaining tasks

Potential security issues?

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇦🇹Austria hudri Austria

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024