From 6c11fccc84f4c84fa72ee01f9caad9f76f35cea2 Mon Sep 17 00:00:00 2001 From: dujinkim Date: Tue, 16 Sep 2025 09:20:58 +0000 Subject: (대표님, 최겸) 계약, 업로드 관련, 메뉴처리, 입찰, 프리쿼트, rfqLast관련, tbeLast관련 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/contracts/get-template/route.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'app/api/contracts') diff --git a/app/api/contracts/get-template/route.ts b/app/api/contracts/get-template/route.ts index c987c527..ff42196f 100644 --- a/app/api/contracts/get-template/route.ts +++ b/app/api/contracts/get-template/route.ts @@ -12,8 +12,14 @@ export async function POST(request: NextRequest) { { status: 400 } ); } + const isDev = process.env.NODE_ENV === 'development'; - const fullPath = path.join(process.cwd(), `${process.env.NAS_PATH}`, templatePath); + const fullPath = + isDev ? + path.join(process.cwd(), `public`, templatePath) + : + path.join(`${process.env.NAS_PATH}`, templatePath); + const fileBuffer = await readFile(fullPath); return new NextResponse(fileBuffer, { -- cgit v1.2.3