fix: diagrams SVG content length (#1928)

This commit is contained in:
Philip Okugbe
2026-02-09 18:20:09 -08:00
committed by GitHub
parent f6a8247c48
commit aff8dba2cb
2 changed files with 3 additions and 1 deletions
@@ -464,7 +464,8 @@ export class AttachmentController {
'Cache-Control': `${cacheScope}, max-age=3600`,
});
if (fileSize) {
const isSvg = attachment.fileExt === '.svg';
if (fileSize && !isSvg) {
res.header('Content-Length', fileSize);
}
@@ -99,6 +99,7 @@ export class AttachmentService {
if (isUpdate) {
attachment = await this.attachmentRepo.updateAttachment(
{
fileSize: preparedFile.fileSize,
updatedAt: new Date(),
},
attachmentId,