Spaces:
Running
Running
File size: 650 Bytes
27e706d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | 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";
@Controller("ocr")
@UseGuards(JwtAuthGuard)
export class OcrController {
constructor(
private readonly ocrService: OcrService,
) {}
@Post("patient-record")
@UseInterceptors(
FilesInterceptor("files", 10),
)
async uploadPatientRecord(
@UploadedFiles()
files: Express.Multer.File[],
) {
return this.ocrService.extractPatientRecord(files);
}
} |