feat(documents): bulk upload — split-panel with file switcher #329

Merged
marcel merged 46 commits from feat/issue-317-bulk-upload into main 2026-04-25 12:24:25 +02:00
2 changed files with 2 additions and 0 deletions
Showing only changes of commit 1fca1f80a2 - Show all commits

View File

@@ -134,6 +134,7 @@ public class DocumentService {
}
public void validateBatch(int fileCount, DocumentBatchMetadataDTO metadata) {
// 50-file hard cap keeps FormData requests at a manageable size and protects against runaway bulk uploads.
if (fileCount > 50) {
throw DomainException.badRequest(ErrorCode.BATCH_TOO_LARGE, "Batch exceeds maximum of 50 files per request");
}

View File

@@ -110,6 +110,7 @@ async function save() {
if (saving) return;
saving = true;
const entries = Array.from(files.values());
// 10 files per request keeps multipart bodies well under typical reverse-proxy limits (e.g. nginx default 1 MB client_max_body_size per PDF).
const chunkSize = 10;
const chunks: FileEntry[][] = [];
for (let i = 0; i < entries.length; i += chunkSize) {