Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291717

Make unused file 'cleanup' configurable

$
0
0

Problem/Motivation

Core's file fields have very hard-coded assumptions that if a file is no longer used in a file reference field, then it should be deleted. This is because there's no way to have any kind of media "library" like http://drupal.org/project/media. Once we shift into a library sort of UX then auto-deleting files becomes unacceptable since it's perfectly valid for those files to sit un-used and then down the road re-used without having to re-upload the file. We are dealing with so many bug reports and issues in the Media issue queue due to this "feature" in core. It would be nice if the Media module could force this behavior to be optional.

Also this behavior depends on files being tracked with usage anywhere they can, while the file usage is only meant for entities. We are unable to add usage for media embedded into WYSIWYG for one big reason: filters lack context about the entity that has the text field being changed/viewed.

Proposed resolution

We propose to make file cleanup optional by introducing a configuration variable and UI configuration interface that:
1. Makes people aware of cleanup beeing a part of Drupal core
2. Allows them to enable/disable it

Remaining tasks

- create vaiable
- create UI configuration

User interface changes

- adds new form element under admin/config/media/file-system

API changes

- no API changes


Viewing all articles
Browse latest Browse all 291717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>