refactor(media): simplify content type assignment logic in media controller
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user