fix: reject duplicate completed upload names
A user could select another local file with the same name as one that already exists in completed storage. The upload would be allowed to start and only hit an existing-file conflict late in the flow, which made the UI look like the file was uploadable. Reject duplicate sanitized names during upload creation so no staging record or chunk transfer starts for a file that cannot be completed. Keep the completion path non-replacing as a second guard by promoting through a no-overwrite file creation path, with a hard-link fast path and copy fallback for custom temp locations. The browser now treats the server's duplicate-name conflict as a terminal row: it disables the action, marks the item visually, and tells the user to rename the file if they want to upload that copy. Test Plan: - just check Refs: none
This commit is contained in:
@@ -109,6 +109,15 @@ h1 {
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.upload-item-blocked {
|
||||
border-color: #f04438;
|
||||
background: rgb(240 68 56 / 8%);
|
||||
}
|
||||
|
||||
.upload-item-blocked .upload-meta span {
|
||||
color: #b42318;
|
||||
}
|
||||
|
||||
.upload-item-header {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto;
|
||||
|
||||
Reference in New Issue
Block a user