import { open, openSync, readFileSync } from "fs";
import { NextRequest, NextResponse } from "next/server";
import path from "path";

export async function GET(req:NextRequest, { params }: {params:{slug: string}}){
    const fp = path.resolve('.',`bucket`,...params.slug);
    return new Response(readFileSync(fp));
}