From a9bffba07973de2becaa84d9d96095a434b2853d Mon Sep 17 00:00:00 2001 From: dujinkim Date: Thu, 30 Oct 2025 10:02:49 +0000 Subject: (임수민) 기본계약서 경로 수정 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/files/[...path]/route.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/api/files/[...path]/route.ts b/app/api/files/[...path]/route.ts index 0416f800..58014a45 100644 --- a/app/api/files/[...path]/route.ts +++ b/app/api/files/[...path]/route.ts @@ -74,8 +74,12 @@ export async function GET( ); // 디코딩된 경로로 조합 - const requestedPath = decodedPath.join('/'); + let requestedPath = decodedPath.join('/'); + if (requestedPath.startsWith('api/files/')) { + requestedPath = requestedPath.substring('api/files/'.length); + } + console.log(`📂 파일 요청: ${requestedPath}`); // ✅ 다운로드 강제 여부 확인 -- cgit v1.2.3