Specified file could not be uploaded, file at temporary:// already exists. Enter a unique file URI.

Created on 28 May 2025, 7 days ago

Problem/Motivation

Despite πŸ› Allow replacing file with same name Closed: works as designed indicating that replacing a file with one of the same name does work, i am getting the following error message:

> The specified file test.pdf could not be uploaded. The file temporary://test.pdf already exists. Enter a unique file URI.

This error traces back to a core validation constraint:

web/core/modules/file/src/Plugin/Validation/Constraint/FileUriUnique.php:19

Steps to reproduce

Upload a file, and then upload a replacement of the same name before cron has run and cleanup jobs are performed.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States mlncn Minneapolis, MN, USA

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

Comments & Activities

Production build 0.71.5 2024