diff --git a/src/app/api/mobile/project/file/[id]/route.ts b/src/app/api/mobile/project/file/[id]/route.ts index 69b591f..97820bb 100644 --- a/src/app/api/mobile/project/file/[id]/route.ts +++ b/src/app/api/mobile/project/file/[id]/route.ts @@ -164,7 +164,7 @@ export async function POST(request: Request, context: { params: { id: string } } if (String(pair[0]).substring(0, 4) == "file") { const file = body.get(pair[0]) as File const fExt = file.name.split(".").pop() - const fName = file.name.replace("." + fExt, "") + const fName = decodeURIComponent(file.name.replace("." + fExt, "")) const upload = await funUploadFile({ file: file, dirId: DIR.project }) if (upload.success) { diff --git a/src/app/api/mobile/project/task/file/[id]/route.ts b/src/app/api/mobile/project/task/file/[id]/route.ts index b8b79a7..a9db587 100644 --- a/src/app/api/mobile/project/task/file/[id]/route.ts +++ b/src/app/api/mobile/project/task/file/[id]/route.ts @@ -84,7 +84,7 @@ export async function POST(request: Request, context: { params: { id: string } } const file = body.get(key) as File; const fExt = file.name.split(".").pop(); - const fName = file.name.replace("." + fExt, ""); + const fName = decodeURIComponent(file.name.replace("." + fExt, "")); const upload = await funUploadFile({ file, dirId: DIR.project }); if (!upload.success) continue; diff --git a/src/app/api/mobile/task/file/[id]/route.ts b/src/app/api/mobile/task/file/[id]/route.ts index 77d660d..3ab71dd 100644 --- a/src/app/api/mobile/task/file/[id]/route.ts +++ b/src/app/api/mobile/task/file/[id]/route.ts @@ -114,7 +114,7 @@ export async function POST(request: Request, context: { params: { id: string } } if (String(pair[0]).substring(0, 4) == "file") { const file = body.get(pair[0]) as File const fExt = file.name.split(".").pop() - const fName = file.name.replace("." + fExt, "") + const fName = decodeURIComponent(file.name.replace("." + fExt, "")) const upload = await funUploadFile({ file: file, dirId: DIR.task }) diff --git a/src/app/api/mobile/task/route.ts b/src/app/api/mobile/task/route.ts index 784be12..fffe58f 100644 --- a/src/app/api/mobile/task/route.ts +++ b/src/app/api/mobile/task/route.ts @@ -213,7 +213,7 @@ export async function POST(request: Request) { if (String(pair[0]).substring(0, 4) == "file") { const file = body.get(pair[0]) as File const fExt = file.name.split(".").pop() - const fName = file.name.replace("." + fExt, "") + const fName = decodeURIComponent(file.name.replace("." + fExt, "")) const upload = await funUploadFile({ file: file, dirId: DIR.task }) if (upload.success) { diff --git a/src/app/api/mobile/task/tugas/file/[id]/route.ts b/src/app/api/mobile/task/tugas/file/[id]/route.ts index b9f7365..994952b 100644 --- a/src/app/api/mobile/task/tugas/file/[id]/route.ts +++ b/src/app/api/mobile/task/tugas/file/[id]/route.ts @@ -87,7 +87,7 @@ export async function POST(request: Request, context: { params: { id: string } } const file = body.get(key) as File; const fExt = file.name.split(".").pop(); - const fName = file.name.replace("." + fExt, ""); + const fName = decodeURIComponent(file.name.replace("." + fExt, "")); const upload = await funUploadFile({ file, dirId: DIR.task }); if (!upload.success) continue;