From 26e373f736db29efe64caa1c7b02cbae5b87ad2e Mon Sep 17 00:00:00 2001 From: jingrow Date: Thu, 22 Jan 2026 22:47:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96files=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E6=96=87=E4=BB=B6=EF=BC=8C=E9=80=82=E9=85=8D=E6=96=B0=E7=89=88?= =?UTF-8?q?next.js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/files/[...path]/route.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/files/[...path]/route.js b/app/files/[...path]/route.js index 8ed9625..004f877 100644 --- a/app/files/[...path]/route.js +++ b/app/files/[...path]/route.js @@ -30,7 +30,8 @@ function getContentType(filePath) { export async function GET(req, { params }) { try { - const parts = params.path || []; + const resolvedParams = await params; + const parts = resolvedParams.path || []; const fileName = parts.join('/'); if (!fileName) return new NextResponse('Not Found', { status: 404 });