Consider making file field upload destination changeable even after data exists

Created on 24 January 2023, over 1 year ago
Updated 9 February 2024, 4 months ago

Problem/Motivation

In πŸ› Field storage settings give a scary red warning that they can't be changed when the cardinality is the only thing with restrictions Fixed @berdir suggested the following

And we might want a separate issue to discuss making the upload destination configurable [after data exists in a file field], because right now it's not even though there is IMHO no reason for that, if anything, we could add a description that it will only affect new files and not existing ones. See \Drupal\file\Plugin\Field\FieldType\FileItem::storageSettingsForm()

Because that issue is likely to land shortly, and that suggestion is not within its scope, this issue has been created as the new home for the idea from July 2017 that would otherwise be orphaned.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Active

Version

11.0 πŸ”₯

Component
Field UIΒ  β†’

Last updated 3 days ago

Created by

πŸ‡ΊπŸ‡ΈUnited States bnjmnm Ann Arbor, MI

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.

  • Issue created by @bnjmnm
  • πŸ‡¨πŸ‡­Switzerland Berdir Switzerland

    Not sure what to add :)

    As written many years ago, it makes no sense to not allow to change this setting IMHO, as it only affects new files. And as also written, we could mention in the description that changing this will only affect new files.

    I think it probably shouldn't be a storage setting at all, should be next to the path setting (which you can already now easily and always change and has the exact same possible confusion), but that's a bigger change.

  • πŸ‡«πŸ‡·France gilbertdelyon

    There are 4 types of media in our site
    - image - single image
    - image_1 - multiple images for events galeries (ex: weddings, holidays, birthdays...)
    - documents
    - viseos files

    I recently moved all the existing files from "public" to "private".
    I couldn't change, nor for "documents", neither for "videos"
    but I could for "images"

    This is strange. Would it come from the fact I have 2 types of image media?

Production build 0.69.0 2024