@@ -5,9 +5,9 @@ import path from "path";
|
||||
import { resolveMediaUploadPath } from "@/lib/media-storage";
|
||||
|
||||
type MediaFileRouteProps = {
|
||||
params: {
|
||||
params: Promise<{
|
||||
segments: string[];
|
||||
};
|
||||
}>;
|
||||
};
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
@@ -23,7 +23,8 @@ const CONTENT_TYPES: Record<string, string> = {
|
||||
};
|
||||
|
||||
export async function GET(_: Request, { params }: MediaFileRouteProps) {
|
||||
const relativePath = params.segments.join("/");
|
||||
const { segments } = await params;
|
||||
const relativePath = segments.join("/");
|
||||
const publicPath = `/uploads/media/${relativePath}`;
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user