Allow altering the file location on its origin

Created on 14 April 2022, about 2 years ago
Updated 30 January 2024, 5 months ago

Problem/Motivation

We have a site were files are migrated from multiple servers into Drupal. The files of each server are up to be saved in a subdirectory of "public://" to avoid problems with duplicate file names and to make it easier for editors to recognize the origin.

Example:

sites/default/files/
+ origin1/*
+ origin2/*
+ ...

Stage File Proxy only allows one origin website in its configuration (which is totally fine in 99,99% of all cases). Unfortunately this makes it impossible to switch the origin server based on the requested file location (@see ProxySubscriber::checkFileOrigin()).

Proposed resolution

Add an alter-hook to allow overriding the generated location.

✨ Feature request
Status

Needs work

Version

3.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany stBorchert

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024