Split large activity Excel prepare from chunk import and clarify errors.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-03 17:58:41 +03:30
co-authored by Cursor
parent 07bdc4a3b6
commit d3fb92a5e2
4 changed files with 116 additions and 4 deletions
@@ -100,6 +100,19 @@ export class ActivitiesController {
return this.excelService.preview(file);
}
@Post('import/prepare')
@UseInterceptors(excelUpload)
importPrepare(
@CurrentUser() user: Actor,
@UploadedFile() file?: Express.Multer.File,
@Body('mapping') mapping?: string,
) {
if (!file?.buffer?.length) {
throw new BadRequestException('فایل ارسال نشده');
}
return this.excelService.prepare(user, file, mapping);
}
@Post('import')
@UseInterceptors(excelUpload)
import(