1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
import { type APIContext } from 'astro'; import data from '../util/file.bin'; export const prerender = false; export async function GET( context: APIContext ): Promise<Response> { return new Response(data, { status: 200, headers: { 'Content-Type': 'binary/octet-stream', }, }); }