fix: remove stale storage keys from localStorage

This commit is contained in:
Tobias Goerke 2023-07-27 09:01:07 +02:00
parent 60f2f321c8
commit f4154bd6ee
2 changed files with 5 additions and 0 deletions

View File

@ -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();
},
});

View File

@ -16,6 +16,7 @@ import (
"crypto/rand"
"encoding/hex"
"errors"
"fmt"
"io"
"net/http"
"os"