From cdcf7e7772950c1cb8c9c7aaabd28f23e0cf6d64 Mon Sep 17 00:00:00 2001 From: infinite-persistence <64950861+infinite-persistence@users.noreply.github.com> Date: Thu, 7 Jul 2022 20:53:47 +0800 Subject: [PATCH] tus: Fix `upload not found` scenario (#1808) ## Steps When it upload reaches 100%, click Cancel (not refresh). ## Issue There was an old hack in b0509bc9 where we decided to wait a while before sending `notify` as the server was not responsive. Since the task was dispatched before the Cancel action, the server cleared the upload first and later received the `notify`. ## Change Instead of trying to cancel the timer, I think the hack is no longer needed given the throughput and lock fixes. With things running back in sequential mode, the Cancel button will now just show the "upload already completed" modal. --- web/setup/publish-v2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/setup/publish-v2.js b/web/setup/publish-v2.js index 5269585f6..338b082d6 100644 --- a/web/setup/publish-v2.js +++ b/web/setup/publish-v2.js @@ -147,7 +147,7 @@ export function makeResumableUploadRequest( xhr.send(jsonPayload); } - setTimeout(() => makeNotifyRequest(), 15000); + makeNotifyRequest(); }, });