Merge remote-tracking branch 'origin/master' into vnext
This commit is contained in:
commit
dd0cb78ea2
48 changed files with 4748 additions and 7858 deletions
|
@ -216,6 +216,7 @@ function download(id, keychain, onprogress, canceller) {
|
|||
const blob = new Blob([xhr.response]);
|
||||
resolve(blob);
|
||||
});
|
||||
|
||||
xhr.addEventListener('progress', function(event) {
|
||||
if (event.lengthComputable && event.target.status === 200) {
|
||||
onprogress([event.loaded, event.total]);
|
||||
|
@ -224,8 +225,10 @@ function download(id, keychain, onprogress, canceller) {
|
|||
const auth = await keychain.authHeader();
|
||||
xhr.open('get', `/api/download/${id}`);
|
||||
xhr.setRequestHeader('Authorization', auth);
|
||||
xhr.setRequestHeader('Connection', 'close');
|
||||
xhr.responseType = 'blob';
|
||||
xhr.send();
|
||||
onprogress([0, 1]);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue