diff --git a/frontend/src/api/tus.js b/frontend/src/api/tus.js index cd4456b9..0e4e67a7 100644 --- a/frontend/src/api/tus.js +++ b/frontend/src/api/tus.js @@ -43,6 +43,10 @@ export async function upload(url, content = "", overwrite = false, onupload) { } }, onSuccess: function () { + // Remove the upload from the storage when completed. + // Otherwise, old storage keys aren't overwritten, which + // lets resumable uploads fail. + upload._removeFromUrlStorage(); resolve(); }, }); diff --git a/http/tus_store.go b/http/tus_store.go index 90ba7b61..241e4534 100644 --- a/http/tus_store.go +++ b/http/tus_store.go @@ -16,6 +16,7 @@ import ( "crypto/rand" "encoding/hex" "errors" + "fmt" "io" "net/http" "os"