Allow modules to declare the list of files it ships with and should be publicly accessible

Created on 23 March 2017, over 8 years ago
Updated 8 June 2025, 16 days ago

Problem/Motivation

This idea came up while working on #2831274: Bring Media entity module to core as Media module . Media entity comes with images that are used as fallback thumbnails. Since they are stored in an image field when they are used they need to live in a public:/ or private:/ files directory.

Media solves that by copying them into the public directory on install. Solution is not the nicest though.

Proposed resolution

It would be nice if core would provide some kind of mechanism for modules to declare the list of files they ship with and need to be publicly accessible. It could be another yml file for example.

Core would then handle this automatically; make sure files are copied to a place inside webroot when module is installed and removed from it when they are uninstalled.

If we would do that we could start moving the actual modules out of the webroot, which would be great for the security. And media would be happy since it woudn't need to use the custom not-so-nice logic that it currently has :).

Alternative

Leverage #2927968: Add system stream wrappers to core

Remaining tasks

TBD

Feature request
Status

Postponed

Version

11.0 🔥

Component

extension system

Created by

🇸🇮Slovenia slashrsm

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.71.5 2024