Module Description
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
* Ability to specify how to handle existing files with the same file name
* 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.


* #2940383: Create FileFieldUploader service that unifies file upload logic of core's UI, REST module and JSON:API module
* #2648816: Uploaded files are impossible to replace
* #2241865: Do not create a new file entity in order to overwrite an existing entity

Similar modules See the project pages for how these modules work.


* Media Entity File Replace
* File Replace
* File Field Replace

Project Usage
123
Creation Date
Changed Date
Security Covered
Not Covered By Security Advisory
Version Available
Production
Module Summary
The module aims to handle file uploads with the same name as existing files by altering the underlying file handling rather than the UI.
Data Name
file_upload_options

OPENAI CHATBOT

OPENAI CHATBOT

14:26:07
Generic Chatbot
Hi, I'm a Drupal module expert powered by OpenAI, answering your questions about the Drupal module ecosystem. How can I be helpful today? Please note that we will log your question.