feat(storage): complete phase 3 branding foundation

This commit is contained in:
poyrazavsever
2026-07-16 17:05:59 +03:00
parent b155132acf
commit 5d863280bf
31 changed files with 5302 additions and 57 deletions
+16
View File
@@ -0,0 +1,16 @@
export function fileResponse(
metadata: { mimeType: string; originalName: string; sha256: string },
bytes: Uint8Array,
cacheControl: string,
) {
return new Response(bytes as BodyInit, {
headers: {
"Cache-Control": cacheControl,
"Content-Disposition": `inline; filename*=UTF-8''${encodeURIComponent(metadata.originalName)}`,
"Content-Length": String(bytes.byteLength),
"Content-Type": metadata.mimeType,
ETag: `"${metadata.sha256}"`,
"X-Content-Type-Options": "nosniff",
},
});
}