Commit Graph

2 Commits

Author SHA1 Message Date
b4befde418 refactor(api): migrate controllers to Stream API with Base64 validation
PdfValidationController:
- ValidateFromFile: IFormFile.OpenReadStream() direct usage (no byte[] copy)
- ValidateFromBase64: try-catch Convert.FromBase64String → BadRequestException
- ValidatePdfAFromFile: IFormFile.OpenReadStream() direct usage
- ValidatePdfAFromBase64: try-catch Convert.FromBase64String → BadRequestException

PdfAttachmentController:
- CheckAttachmentsFromBase64: try-catch Convert.FromBase64String → BadRequestException

SwissQrCodeController:
- ExtractFromBase64: try-catch Convert.FromBase64String → BadRequestException

All controllers: Add using DocumentOperator.Domain.Common.Exceptions for BadRequestException
2026-07-20 16:32:03 +02:00
9db15f7025 feat: Add PdfAttachmentController with CheckAttachments endpoints
- Add POST /api/pdf/attachments/check endpoint (multipart/form-data)
- Add POST /api/pdf/attachments/check endpoint (application/json with Base64)
- Dual input support: IFormFile (file upload) and Base64 JSON
- Controller converts IFormFile → byte[] and sends to MediatR
- Complete XML documentation with Swagger examples
- Primary constructor pattern used
2026-07-20 11:56:12 +02:00