From 5fba397efa32f88289b3d0b1eafd310abbb8e614 Mon Sep 17 00:00:00 2001 From: Till Heidrich Date: Thu, 23 Jul 2026 20:32:50 +0000 Subject: [PATCH] refactor: NAS mirror uses base folder directly (no redundant klarbild segment) Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01XNQ8ghPfzAfsyVYd6HgFb6 --- src/lib/nas.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/nas.ts b/src/lib/nas.ts index 4879f65..e40754a 100644 --- a/src/lib/nas.ts +++ b/src/lib/nas.ts @@ -77,7 +77,8 @@ export async function mirrorItemToNas(itemId: string): Promise<{ ok: boolean; me try { const buf = await getObject(it.result_path); const ym = new Date(it.created_at || Date.now()).toISOString().slice(0, 7); // JJJJ-MM - await uploadToNas(cfg, posixpath.join('klarbild', ym), it.filename || `${it.id}.png`, buf); + // Struktur: /JJJJ-MM/ — der Basisordner ist frei wählbar. + await uploadToNas(cfg, ym, it.filename || `${it.id}.png`, buf); await query(`UPDATE items SET nas_status='mirrored' WHERE id=$1`, [itemId]); return { ok: true, message: 'Auf NAS gesichert.' }; } catch (e: any) {