Spaces:
Running
Running
| import { | |
| Controller, | |
| Post, | |
| UploadedFiles, | |
| UseInterceptors, | |
| UseGuards, | |
| } from "@nestjs/common"; | |
| import { FilesInterceptor } from "@nestjs/platform-express"; | |
| import { JwtAuthGuard } from "../auth/guards/jwt-auth.guard"; | |
| import { OcrService } from "./ocr.service"; | |
| ("ocr") | |
| (JwtAuthGuard) | |
| export class OcrController { | |
| constructor( | |
| private readonly ocrService: OcrService, | |
| ) {} | |
| ("patient-record") | |
| ( | |
| FilesInterceptor("files", 10), | |
| ) | |
| async uploadPatientRecord( | |
| () | |
| files: Express.Multer.File[], | |
| ) { | |
| return this.ocrService.extractPatientRecord(files); | |
| } | |
| } |