Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 52s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 52s
This commit is contained in:
commit
d8be027583
2 changed files with 3 additions and 3 deletions
|
|
@ -211,6 +211,9 @@ export class FileController extends Controller {
|
||||||
let fileList = !body.replace
|
let fileList = !body.replace
|
||||||
? await Promise.all(
|
? await Promise.all(
|
||||||
body.fileList.map(async ({ fileName, ...props }) => {
|
body.fileList.map(async ({ fileName, ...props }) => {
|
||||||
|
if(fileName.length > 85){
|
||||||
|
throw new Error("ไม่สามารถอัปโหลดไฟล์ได้ เนื่องจากชื่อไฟล์มีความยาวเกินที่ระบบกำหนด กรุณาปรับชื่อไฟล์ให้สั้นลง");
|
||||||
|
}
|
||||||
const dotIndex = fileName.lastIndexOf(".");
|
const dotIndex = fileName.lastIndexOf(".");
|
||||||
const originalName =
|
const originalName =
|
||||||
dotIndex !== -1 && !fileName.startsWith(".") ? fileName.slice(0, dotIndex) : fileName;
|
dotIndex !== -1 && !fileName.startsWith(".") ? fileName.slice(0, dotIndex) : fileName;
|
||||||
|
|
|
||||||
|
|
@ -180,9 +180,6 @@ export class DocumentController extends Controller {
|
||||||
|
|
||||||
let fileList = !body.replace
|
let fileList = !body.replace
|
||||||
? body.fileList.map(({ fileName, ...props }) => {
|
? body.fileList.map(({ fileName, ...props }) => {
|
||||||
if(fileName.length > 85){
|
|
||||||
throw new Error("ไม่สามารถอัปโหลดไฟล์ได้ เนื่องจากชื่อไฟล์มีความยาวเกินที่ระบบกำหนด กรุณาปรับชื่อไฟล์ให้สั้นลง");
|
|
||||||
}
|
|
||||||
const dotIndex = fileName.lastIndexOf(".");
|
const dotIndex = fileName.lastIndexOf(".");
|
||||||
let originalName =
|
let originalName =
|
||||||
dotIndex !== -1 && !fileName.startsWith(".") ? fileName.slice(0, dotIndex) : fileName;
|
dotIndex !== -1 && !fileName.startsWith(".") ? fileName.slice(0, dotIndex) : fileName;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue