added content-length to sw response
This commit is contained in:
parent
ddeaf8076d
commit
5677390a45
2 changed files with 4 additions and 1 deletions
|
@ -33,7 +33,8 @@ async function decryptStream(request) {
|
|||
const decrypted = file.keychain.decryptStream(readStream);
|
||||
|
||||
const headers = {
|
||||
'Content-Disposition': 'attachment; filename=' + file.filename
|
||||
'Content-Disposition': 'attachment; filename=' + file.filename,
|
||||
'Content-Length': file.size
|
||||
};
|
||||
|
||||
return new Response(decrypted, { headers });
|
||||
|
@ -60,6 +61,7 @@ self.onmessage = event => {
|
|||
const info = {
|
||||
keychain: new Keychain(event.data.key),
|
||||
filename: event.data.filename,
|
||||
size: event.data.size,
|
||||
progress: 0,
|
||||
cancelled: false
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue