mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-06 22:20:55 +03:00
fixes downloading files as .part
This commit is contained in:
@@ -63,7 +63,7 @@ export default class FileReceiver extends Nanobus {
|
|||||||
state = await reader.read();
|
state = await reader.read();
|
||||||
}
|
}
|
||||||
|
|
||||||
return result.buffer;
|
return result.slice(0, offset).buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
async download(noSave = false) {
|
async download(noSave = false) {
|
||||||
@@ -85,10 +85,9 @@ export default class FileReceiver extends Nanobus {
|
|||||||
this.emit('decrypting');
|
this.emit('decrypting');
|
||||||
|
|
||||||
const dec = await this.keychain.decryptStream(ciphertext);
|
const dec = await this.keychain.decryptStream(ciphertext);
|
||||||
const plainstream = dec.stream;
|
|
||||||
const plaintext = await this.streamToArrayBuffer(
|
const plaintext = await this.streamToArrayBuffer(
|
||||||
plainstream,
|
dec.stream,
|
||||||
dec.streamInfo.fileSize
|
this.fileInfo.size
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!noSave) {
|
if (!noSave) {
|
||||||
|
|||||||
Reference in New Issue
Block a user