tus: skip fingerprint storage

## Ticket
418 TUS: skip fingerprint storage

- Fingerprints for canceled uploads are not being cleared by tus-js-client. It's in localStorage, and there is limit for that.
- We are storing the confirmed fingerprint (from the backend) in redux anyway, so we don't need that functionality.
This commit is contained in:
infinite-persistence 2021-12-13 15:35:21 +08:00
parent e3956150a3
commit 9c723b3db3
No known key found for this signature in database
GPG key ID: B9C3252EDC3D0AA0

View file

@ -62,6 +62,7 @@ export function makeResumableUploadRequest(
chunkSize: UPLOAD_CHUNK_SIZE_BYTE,
retryDelays: [0, 5000, 10000, 15000],
parallelUploads: 1,
storeFingerprintForResuming: false,
removeFingerprintOnSuccess: true,
headers: { [X_LBRY_AUTH_TOKEN]: token },
metadata: {
@ -128,11 +129,6 @@ export function makeResumableUploadRequest(
uploader
.findPreviousUploads()
.then((previousUploads) => {
const index = previousUploads.findIndex((prev) => prev.uploadUrl === params.uploadUrl);
if (index !== -1) {
uploader.resumeFromPreviousUpload(previousUploads[index]);
}
if (!isPreview) {
window.store.dispatch(doUpdateUploadAdd(file, params, uploader));
}