From 468c664a9ca9ccc45c3d6989bdb029b8b4924423 Mon Sep 17 00:00:00 2001 From: Rory& Date: Tue, 23 Sep 2025 21:54:32 +0200 Subject: [PATCH] Maybe end the request? --- src/cdn/routes/attachments.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cdn/routes/attachments.ts b/src/cdn/routes/attachments.ts index b872a6ee..fbab566a 100644 --- a/src/cdn/routes/attachments.ts +++ b/src/cdn/routes/attachments.ts @@ -147,7 +147,7 @@ router.put("/:channel_id/:batch_id/:attachment_id/:filename", multer.single("fil req.on("end", async () => { console.log(`[Cloud Upload] Finished receiving file, total size ${length} bytes`); const buffer = Buffer.concat(chunks); - const path = `${channel_id}/${batch_id}/${attachment_id}/${filename}`; + const path = `attachments/${channel_id}/${batch_id}/${attachment_id}/${filename}`; await storage.set(path, buffer); if (att.userOriginalContentType?.includes("image")) { @@ -162,7 +162,7 @@ router.put("/:channel_id/:batch_id/:attachment_id/:filename", multer.single("fil await att.save(); console.log("[Cloud Upload] Saved attachment", att.id, att.userFilename, att); - res.status(200); + res.status(200).end(); }); });