Open
Description
Bug description
If you try to replace an asset with a file with the exact same name and the Delete Original Asset
is on, which is the default, the image is actually removed.
How to reproduce
- Install fresh Statamic site with super user
- Open Asset listing
- Upload a file
- Click on the asset and choose
Replace
- Upload the same file
- Click 'Fix...'
- Choose
Overwrite Existing File
- Note the error toasts you see
- Click
Replace Asset
- Notice there's now no assets in the container.
I would expect the file to be there.
Logs
No response
Environment
Environment
Application Name: Statamic
Laravel Version: 11.34.2
PHP Version: 8.3.14
Composer Version: 2.8.3
Environment: local
Debug Mode: ENABLED
URL: asset-replacing.test
Maintenance Mode: OFF
Timezone: UTC
Locale: en
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED
Drivers
Broadcasting: log
Cache: file
Database: sqlite
Logs: stack / single
Mail: log
Queue: sync
Session: file
Statamic
Addons: 0
Sites: 1
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 5.42.0 Solo
Installation
Fresh statamic/statamic site via CLI
Additional details
No response