Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Try writing the stream manually (same result)

Manav Rathia5be903abe22
diff --git a/desktop/src/main/stream.ts b/desktop/src/main/stream.ts
index 8ddb80dc6a..2d0eaa62c0 100644
--- a/desktop/src/main/stream.ts
+++ b/desktop/src/main/stream.ts
@@ -37,7 +37,16 @@ export const registerStreamProtocol = () => {
/* host-pathname----- */
case "write":
try {
- await writeStream(path, request.body);
+ // 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;
+ }
+ console.log("ending stream");
+
return new Response("", { status: 200 });
} catch (e) {
log.error(`Failed to write stream for ${url}`, e);