Problem/Motivation

When using Stage File Proxy in combination with other modules like Media Entity Download, sometimes the files do not exist yet because they aren't images. They might be PDFs files on the origin. It would be nice to support hook_file_url_alter() to rewrite the files to their proxy URL, and also implements hook_file_download to support #2925406: Allow redirect responses for download requests (and automatically redirect external file URLs like s3fs)

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

dave reid created an issue. See original summary.

smustgrave’s picture

Version: 3.1.x-dev » 4.0.x-dev

I'm willing to merge the change to the DownloadManager but the hook stuff seems specific to the media entity download module?

smustgrave’s picture

Status: Active » Needs review

I removed the download hook as that seems specific to media_entity_download but the rest I don't mind merging.

smustgrave’s picture

Status: Needs review » Fixed

Think we are safe to add to 4.0.x

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.