Added download endpoint content-type

This commit is contained in:
Filip Znachor 2024-09-17 09:52:50 +02:00
parent 9ea0624022
commit 244e522b9b

View file

@ -58,6 +58,7 @@ fastify.get("/track/:id/download", async (req, r) => {
let { id } = (req.params as any);
let data = await backend.download(id);
r.header("content-disposition", `inline; filename="${data.filename}"`);
r.header("content-type", "application/octet-stream");
return data.stream;
});