我使用 cloudflare 流通过 TUS 上传文件,以/stream?direct_user=true
供用户安全上传。但是当上传中止时无法再次恢复。我检查我的浏览器,上传后发现本地存储中没有添加任何行作为指纹。为什么会发生这种情况?以及我是如何解决的?
var options = {
uploadUrl: 'https://upload.videodelivery.net/tus/xxxxxx?tusv2=true',
chunkSize: chunkSize,
retryDelays: retryDelays,
parallelUploads: parallelUploads,
metadata: {
filename: file.name,
filetype: file.type,
},
headers: {},
onError: function (error) {
// do some things
},
onProgress: function (bytesUploaded, bytesTotal) {
// do some things
},
onSuccess: function () {
// do some things
}
}
upload = new tus.Upload(file, options)
upload.start();