Closed (outdated)
Project:
Drupal core
Version:
11.x-dev
Component:
file system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
7 Feb 2020 at 18:06 UTC
Updated:
25 Jun 2025 at 14:28 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
dianacastillo commentedComment #4
lendudeMight be more of a task than a bug, but let's treat it like a bug.
Changed the message as suggested in the IS and added test coverage for the error, which was missing. Also updated the comment so it no longer points to a constant that no longer exists.
Adding a test-only patch, but its a bit iffy since I wouldn't expect that to pass since we are changing the output.
Before the error would read something like :
The file <em class="placeholder">file_test_upload</em> could not be uploaded because a file by that name already exists in the destination <em class="placeholder">temporary://</em>.After it will show:
The file <em class="placeholder">image-test.png</em> could not be uploaded because a file by that name already exists in the destination <em class="placeholder">temporary://</em>.Comment #5
lendudeNow without the unrelated test getting added......
Comment #6
kim.pepperThis may or may not get in before #3232248: Move _file_save_upload_single to a service and deprecate which is a major rework. Linking it here.
Comment #8
joachim commentedPatch looks good to me.
Comment #10
kim.pepperRe-roll of #5 for 10.0.x
Comment #15
mohit_aghera commentedThis issue doesn't exist anymore.
File upload handler has updated the message and the current updated message contains actual filename.
https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/file/...
I think we should close this.
Please reopen if you feel it is still valid.