Problem/Motivation

When storing previews in private://, nobody can access them because they are not managed files (#2346003: Preview image as managed file) so FileDownloadHook never allows access.

Steps to reproduce

Use the pdfpreview formatter on a file field that uses private://. The preview images are then stored in private:// too.

Proposed resolution

Add a hook_file_download that allows access if the user can access the original PDF file.

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork pdfpreview-3624949

Command icon 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

prudloff created an issue. See original summary.

prudloff’s picture

The MR adds a procedural hook, we probably should convert it to an OOP hook.

prudloff’s picture

Issue summary: View changes