(patch) tus: Fix upload not found
scenario (#1814)
Second attempt, this time just hiding the cancel button when the upload is done. If user is impatient and refreshed in between this and `notify`, it will still be resumable later. Bumped MINIMUM_VERSION to nudge for a refresh so we get a slightly more accurate logging, and also to prevent the issue from lingering.
This commit is contained in:
parent
294c5194a4
commit
73e6dfd399
3 changed files with 6 additions and 2 deletions
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
# --- Minimum Version (Format: YYYYMMDDNNN) ---
|
# --- Minimum Version (Format: YYYYMMDDNNN) ---
|
||||||
# Bump this when we want to nudge the user to refresh.
|
# Bump this when we want to nudge the user to refresh.
|
||||||
MINIMUM_VERSION=20220705001
|
MINIMUM_VERSION=20220708001
|
||||||
|
|
||||||
# --- Base config ---
|
# --- Base config ---
|
||||||
WEBPACK_WEB_PORT=9090
|
WEBPACK_WEB_PORT=9090
|
||||||
|
|
|
@ -142,7 +142,9 @@ export default function WebUploadItem(props: Props) {
|
||||||
|
|
||||||
function getCancelButton() {
|
function getCancelButton() {
|
||||||
if (!locked) {
|
if (!locked) {
|
||||||
if (status === 'notify') {
|
if (parseInt(progress) === 100) {
|
||||||
|
return null;
|
||||||
|
} else if (status === 'notify') {
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
button="link"
|
button="link"
|
||||||
|
|
|
@ -147,6 +147,8 @@ export function makeResumableUploadRequest(
|
||||||
xhr.send(jsonPayload);
|
xhr.send(jsonPayload);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Server needs time to process the upload before we can send `notify`.
|
||||||
|
// TODO: Is it file-size dependent?
|
||||||
setTimeout(() => makeNotifyRequest(), 15000);
|
setTimeout(() => makeNotifyRequest(), 15000);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue