feat: Set up initial monorepo structure for admin and mobile applications with core configurations and database integration.
This commit is contained in:
@@ -6,10 +6,11 @@ const UPLOAD_DIR = process.env.UPLOAD_DIR ?? './uploads'
|
||||
|
||||
export async function GET(
|
||||
req: NextRequest,
|
||||
{ params }: { params: { path: string[] } }
|
||||
{ params }: { params: Promise<{ path: string[] }> }
|
||||
) {
|
||||
try {
|
||||
const filePath = path.join(process.cwd(), UPLOAD_DIR, ...params.path)
|
||||
const { path: filePathParams } = await params;
|
||||
const filePath = path.join(process.cwd(), UPLOAD_DIR, ...filePathParams)
|
||||
|
||||
// Security: prevent path traversal
|
||||
const resolved = path.resolve(filePath)
|
||||
|
||||
Reference in New Issue
Block a user