Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Add explicit `Content-Type` header for SVGs

Tim Wilson0aa736115bbc
diff --git a/apps/web/lib/actions/partners/program-resources/add-program-resource.ts b/apps/web/lib/actions/partners/program-resources/add-program-resource.ts
index 8a8f70664a..7d985c6056 100644
--- a/apps/web/lib/actions/partners/program-resources/add-program-resource.ts
+++ b/apps/web/lib/actions/partners/program-resources/add-program-resource.ts
@@ -78,6 +78,9 @@ export const addProgramResourceAction = authActionClient
? {
headers: {
"Content-Disposition": "attachment",
+ ...(extension === "svg" && {
+ "Content-Type": "image/svg+xml",
+ }),
},
}
: undefined,