From 615323b4df724decb837bfb078bdc9659618273f Mon Sep 17 00:00:00 2001 From: Adisak Date: Fri, 31 Oct 2025 18:57:00 +0700 Subject: [PATCH] revert code --- src/controllers/FileController.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/controllers/FileController.ts b/src/controllers/FileController.ts index 690e368..0a1dd32 100644 --- a/src/controllers/FileController.ts +++ b/src/controllers/FileController.ts @@ -211,9 +211,6 @@ export class FileController extends Controller { let fileList = !body.replace ? await Promise.all( body.fileList.map(async ({ fileName, ...props }) => { - if(fileName.length > 85){ - throw new Error("ไม่สามารถอัปโหลดไฟล์ได้ เนื่องจากชื่อไฟล์มีความยาวเกินที่ระบบกำหนด กรุณาปรับชื่อไฟล์ให้สั้นลง"); - } const dotIndex = fileName.lastIndexOf("."); const originalName = dotIndex !== -1 && !fileName.startsWith(".") ? fileName.slice(0, dotIndex) : fileName; @@ -564,9 +561,6 @@ export class SubFileController extends Controller { let fileList = !body.replace ? await Promise.all( body.fileList.map(async ({ fileName, ...props }) => { - if(fileName.length > 85){ - throw new Error("ไม่สามารถอัปโหลดไฟล์ได้ เนื่องจากชื่อไฟล์มีความยาวเกินที่ระบบกำหนด กรุณาปรับชื่อไฟล์ให้สั้นลง"); - } const dotIndex = fileName.lastIndexOf("."); const originalName = dotIndex !== -1 && !fileName.startsWith(".") ? fileName.slice(0, dotIndex) : fileName;