Initial 智念AIGC platform

This commit is contained in:
inman
2026-05-29 10:26:02 +08:00
commit f9c3393f84
86 changed files with 14741 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
import { readLocalServedFile } from "@/lib/server/storage";
export const runtime = "nodejs";
export async function GET(_request: Request, context: { params: Promise<{ path: string[] }> }) {
const { path } = await context.params;
const file = await readLocalServedFile("uploads", path);
if (!file) return new Response("Not found", { status: 404 });
return new Response(new Uint8Array(file.bytes), {
headers: {
"Content-Type": file.contentType,
"Cache-Control": "public, max-age=31536000, immutable"
}
});
}