refactor(media): simplify content type assignment logic in media controller

This commit is contained in:
Mathis HERRIOT
2026-01-20 13:48:16 +01:00
parent a11a332eaa
commit ac4568a0f0

View File

@@ -14,8 +14,7 @@ export class MediaController {
const stream = await this.s3Service.getFile(key);
const contentType =
stats.metaData?.["content-type"] ||
"application/octet-stream";
stats.metaData?.["content-type"] || "application/octet-stream";
res.setHeader("Content-Type", contentType);
res.setHeader("Content-Length", stats.size);