fix: remove stale storage keys from localStorage
This commit is contained in:
parent
60f2f321c8
commit
f4154bd6ee
@ -43,6 +43,10 @@ export async function upload(url, content = "", overwrite = false, onupload) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onSuccess: function () {
|
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();
|
resolve();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@ -16,6 +16,7 @@ import (
|
|||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user