From 046791b63ef4ff312d07c5336c836325789a5fff Mon Sep 17 00:00:00 2001 From: Nils-Johan Gynther Date: Thu, 30 Apr 2026 13:38:23 +0200 Subject: [PATCH] feat: allow application/octet-stream MIME type for PDF uploads in receipt import --- backend/src/receipt-import/receipt-import.service.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/src/receipt-import/receipt-import.service.ts b/backend/src/receipt-import/receipt-import.service.ts index 4bc16ff5..c1481785 100644 --- a/backend/src/receipt-import/receipt-import.service.ts +++ b/backend/src/receipt-import/receipt-import.service.ts @@ -84,7 +84,10 @@ export class ReceiptImportService { ); } - const isPdf = file.mimetype === 'application/pdf'; + const isPdf = + file.mimetype === 'application/pdf' || + file.mimetype === 'application/octet-stream' || + file.originalname?.toLowerCase().endsWith('.pdf'); const rawItems = isPdf ? await this.parseReceiptFromPdf(file.buffer, apiKey) : await this.parseReceiptFromImage(file.buffer, file.mimetype, apiKey);