One of our content editors reported unexpected behavior when replacing a file through the file widget.
The editor is trying to update an existing file, for example document.pdf, with a new version that has the same filename.
Steps to reproduce
- In the file widget, click the Replace button.
- The Select File dialog opens.
- Upload a new file with the same name, for example
document.pdf.
- The dialog shows the updated
document.pdf as Unsaved and does not indicate that an existing file with the same name already exists.
- Click the Insert button.
- The file widget still shows a path ending with
document.pdf.
- Save the entry.
- The uploaded file is stored as
document-1.pdf while the original document.pdf remains unchanged.
- Reopen the entry editor. The file widget now points to
document-1.pdf.
Expected behavior
When using the Replace dialog to upload a file with the same filename, the existing file should be replaced.
To make this behavior clearer, the UI could prompt the user when a file with the same name already exists, for example:
“A file with this name already exists. What would you like to do?”
• Replace existing file
• Keep both files
The UI should also clearly indicate when a new file will be created instead of updating the existing one.
Actual behavior
The interface suggests that the existing file will be updated, but after saving, a new file is created with a -1 suffix instead.
This behavior is unexpected and confusing for content editors because the original file is not replaced or removed.
One of our content editors reported unexpected behavior when replacing a file through the file widget.
The editor is trying to update an existing file, for example
document.pdf, with a new version that has the same filename.Steps to reproduce
document.pdf.document.pdfas Unsaved and does not indicate that an existing file with the same name already exists.document.pdf.document-1.pdfwhile the originaldocument.pdfremains unchanged.document-1.pdf.Expected behavior
When using the Replace dialog to upload a file with the same filename, the existing file should be replaced.
To make this behavior clearer, the UI could prompt the user when a file with the same name already exists, for example:
“A file with this name already exists. What would you like to do?”
• Replace existing file
• Keep both files
The UI should also clearly indicate when a new file will be created instead of updating the existing one.
Actual behavior
The interface suggests that the existing file will be updated, but after saving, a new file is created with a
-1suffix instead.This behavior is unexpected and confusing for content editors because the original file is not replaced or removed.