From 51543396e39b4f8d0d81645e5b760ed33e113ff4 Mon Sep 17 00:00:00 2001 From: nmemmert Date: Tue, 8 Sep 2026 15:42:02 -0400 Subject: [PATCH] Fix Seafile upload response parsed as JSON; v2.0.15 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Seafile seafhttp returns a plain file ID string, not JSON. Replaced res.json() with res.text() — the return value was unused anyway. Co-Authored-By: Claude Sonnet 4.6 --- package.json | 2 +- server/routes/nuggets-host-upload.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 8a9d1d7..f54d267 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "siteforge", "private": true, - "version": "2.0.14", + "version": "2.0.15", "type": "module", "scripts": { "dev": "vite", diff --git a/server/routes/nuggets-host-upload.js b/server/routes/nuggets-host-upload.js index ec5af26..b4e6b10 100644 --- a/server/routes/nuggets-host-upload.js +++ b/server/routes/nuggets-host-upload.js @@ -132,7 +132,7 @@ async function uploadToSeafile(uploadLink, fileBuffer, filename, parentDir) { const body = await res.text() throw new Error(`Seafile upload failed (${res.status}): ${body}`) } - return res.json() + await res.text() } // ── Rate limiter ──────────────────────────────────────────────────────────