Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

file_upload_options

140 sites No security coverage
View on drupal.org

Specify what should happen when uploaded files and images have the same name as existing files. Configured per field, the options are are grouped by entity type.

The module aims to work with all file fields without having to replace existing widgets or file fields. It does this by altering the underlying file handling rather than the UI.

To use, install and go to Admin -> Config -> Media -> File Upload Options to configure.

It also supports file uploads via REST.

Fields defined in code

To configure file fields defined in code, specify the field name under "Custom Fields".

Alternatively, non-entity fields will be automatically added to "Custom Fields" when viewing the form with the field on it. The replace behaviour can then be configured within File Upload Options.

REST

  1. Ability to specify how to handle existing files with the same file name
  2. Re-use an existing file entity with the same URI rather than create a new one

Why?

Currently there is no unified way of handling file uploads in Drupal core. Additionally, many contrib modules go about it their own way. File replace options are generally not available in the UI and are difficult to achieve even in code.

There are a number of related issues which deal with the issue of file management. Once these are resolved modules such as File Upload Options would be much simpler or preferably obsolete.

Similar modules

See the project pages for how these modules work.

Activity

Total releases
1
First release
Jan 2025
Latest release
1 year ago
Release cadence
Stability
100% stable

Releases

Version Type Release date
8.x-1.1 Stable Jan 16, 2025