File upload process can seem confusing to users

Created on 17 August 2025, 6 days ago

Problem/Motivation

First of all, thanks for this very helpful module.

I'm using it in one of my projects, and I've noticed that when a user is uploading files, if they don't click 'save' the files will remain in the file_managed table, as temporary, and depending on how your filesystem is configured may be removed during clean up activities.

Although 'save' does feel logical, this can lead to confusion because if a user doesn't save, the files will still be visible on page load (temporarily)

Steps to reproduce

1. Upload files via a directory listing node
2. Don't click save

Proposed resolution

I toyed with the idea of making these files permanent, but given the way save removes the entries from file_managed im a bit wary of doing this. Possibly a message advising a user they must click save to ensure the files remain permanent would suffice?

Remaining tasks

Decide on what we want to do, and do it.

User interface changes

Possible message to the user advising files are temporary unless saved.

📌 Task
Status

Active

Version

3.1

Component

Directory Listing Pages

Created by

🇬🇧United Kingdom aaron.ferris

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

Comments & Activities

  • Issue created by @aaron.ferris
  • 🇳🇱Netherlands clivesj

    Maybe I don't fully understand this, but what you are describing is the normal behavior of the Drupal File upload.

    When you say:
    Steps to reproduce
    1. Upload files via a directory listing node
    2. Don't click save

    In step-1 you are not uploading the file yet, but just *selecting* the files you want to upload.
    Normally another step is needed to execute the upload. That can be by submitting a node or in case of Filebrowser, Saving the upload (Submitting the upload form)

    Starting with D8 we started using the Core Managed File Class to upload files in Filebrowser. That was for convenience. But other than that we don't do anything with the managed file system and corresponding Core DB tables.

    FB is always intended to use the Unmanaged Filesystem. So, Drupal does not (need to) know what is happening within Filebrowser. The reason is that from the start the intention was to by-pass the Managed File System. You can upload files (outside Drupal, FTP etc) , assign a directory listing to that Directory and Filebrowser will construct the directory.

    I hope this clarifies things, let me know if not or if you still require a feature.

Production build 0.71.5 2024