fix(web): retry-after-abort starts fresh tus session; preserve File past abort

This commit is contained in:
Jannis Braun
2026-05-02 18:18:07 +02:00
parent 61dea725a3
commit dd91f5f349
4 changed files with 77 additions and 29 deletions
@@ -258,8 +258,11 @@ export function MessageInput({ channelId, channelName }: MessageInputProps) {
// bytes get cleaned by the storage janitor (per docs/systems/uploads.md).
useTransferStore.getState().remove(transferId);
} else {
// abortUpload sets state='aborted' and tears down the live tus instance.
// Tear down the live tus instance, then drop the transfer + free the
// retained File reference. (abortUpload alone leaves the record in the
// store for retry-after-abort; here the user is fully discarding.)
abortUpload(transferId);
useTransferStore.getState().remove(transferId);
}
removeStaged(channelId, transferId);
},