feat: enhance receipt import to support PDF files with updated UI and backend processing

This commit is contained in:
Nils-Johan Gynther
2026-04-16 20:22:27 +02:00
parent a12abe0402
commit b8744f625b
3 changed files with 95 additions and 16 deletions
@@ -16,6 +16,7 @@ const ALLOWED_MIMES = [
'image/webp',
'image/heic',
'image/heif',
'application/pdf',
];
@Controller('receipt-import')
@@ -37,7 +38,7 @@ export class ReceiptImportController {
}
if (!ALLOWED_MIMES.includes(file.mimetype)) {
throw new BadRequestException(
'Otillåten filtyp. Använd JPEG, PNG eller WebP.',
'Otillåten filtyp. Använd JPEG, PNG, WebP eller PDF.',
);
}
return this.receiptImportService.parseReceipt(file);