Fixing the error when importing a large Excel file
This commit is contained in:
@@ -82,11 +82,18 @@ export class PeopleController {
|
||||
@CurrentUser() user: Actor,
|
||||
@UploadedFile() file?: Express.Multer.File,
|
||||
@Body('mapping') mapping?: string,
|
||||
@Body('sessionId') sessionId?: string,
|
||||
@Body('offset') offset?: string,
|
||||
@Body('limit') limit?: string,
|
||||
) {
|
||||
if (!file?.buffer?.length) {
|
||||
if (!file?.buffer?.length && !sessionId) {
|
||||
throw new BadRequestException('فایل ارسال نشده');
|
||||
}
|
||||
return this.excelService.importPeople(user, file, mapping);
|
||||
return this.excelService.importPeople(user, file, mapping, {
|
||||
sessionId,
|
||||
offset,
|
||||
limit,
|
||||
});
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
|
||||
Reference in New Issue
Block a user