π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Try another reader
Manav Rathid53a4a14b83c
diff --git a/desktop/src/main/stream.ts b/desktop/src/main/stream.tsindex 2d0eaa62c0..73b04b2cd0 100644--- a/desktop/src/main/stream.ts+++ b/desktop/src/main/stream.ts@@ -39,11 +39,19 @@ export const registerStreamProtocol = () => {try {// await writeStream(path, request.body);console.log("starting stream");- let c = 0;- for await (const p of request.body as any) {- if (c == 327680) console.log(p);- fs.appendFile(path, p);- c += p.length;+ // let c = 0;+ // for await (const p of request.body as any) {+ // if (c == 327680) console.log(p);+ // fs.appendFile(path, p);+ // c += p.length;+ // }+ const reader = request.body.getReader();+ // eslint-disable-next-line no-constant-condition+ while (true) {+ const { value, done } = await reader.read();+ if (done) break;+ console.log(`Received ${value.length} bytes`);+ fs.appendFile(path, value);}console.log("ending stream");