-
-
Notifications
You must be signed in to change notification settings - Fork 617
Description
Bug description
When moving an asset to a subfolder, an existing asset with identical name in that folder is replaced by the moved asset. There is no warning, confirmation dialog, or other note about the other file existing or being replaced.
Also, moving the asset fails in Eloquent setups with a cryptic error message about unique key constraints because it tries to create the new asset in the db before moving it, and the unique key already exists. Most editors can't interpret the SQLite error message.
Ideally, there could be some sort of confirmation dialog, similar to the duplicate-filename upload confirmation.
How to reproduce
Upload test.jpeg & move into folder.
Upload a different file also named test.jpeg & move into folder.
Open folder; only the second uploaded file is inside.
The example is a bit silly because of the manual renaming. In practice, we found this through a user who was cleaning up asset folders and moving multiple files named logo.svg from different folders into a single subfolder.
Logs
Environment
Environment
Laravel Version: 12.56.0
PHP Version: 8.4.3
Composer Version: 2.8.3
Environment: local
Debug Mode: ENABLED
Maintenance Mode: OFF
Timezone: UTC
Locale: en
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: NOT CACHED
Drivers
Broadcasting: log
Cache: file
Database: sqlite
Logs: stack / single
Mail: log
Queue: database
Session: file
Storage
public/storage: NOT LINKED
Statamic
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 6.x-dev PROInstallation
Fresh statamic/statamic site via CLI
Additional details
No response
