fix(bulk-upload): include tagNames in quick-upload metadata payload

Tags were silently dropped because the metadata object built in save()
never included a tagNames field; they never reached the backend.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-04-24 21:12:02 +02:00
committed by marcel
parent e1259215ef
commit 4229e952fb
2 changed files with 26 additions and 1 deletions

View File

@@ -100,7 +100,8 @@ async function save() {
titles: chunk.map((e) => e.title),
senderId: senderId || null,
receiverIds: selectedReceivers.map((r) => r.id),
documentDate: dateIso || null
documentDate: dateIso || null,
tagNames: tags.map((t) => t.name)
};
formData.append('metadata', new Blob([JSON.stringify(metadata)], { type: 'application/json' }));
const res = await fetch('/api/documents/quick-upload', { method: 'POST', body: formData });