Compare commits

...

1 Commits

Author SHA1 Message Date
Philipinho 5f8a567aa0 fix svg content legth 2026-02-09 18:18:29 -08:00
2 changed files with 3 additions and 1 deletions
@@ -464,7 +464,8 @@ export class AttachmentController {
'Cache-Control': `${cacheScope}, max-age=3600`, 'Cache-Control': `${cacheScope}, max-age=3600`,
}); });
if (fileSize) { const isSvg = attachment.fileExt === '.svg';
if (fileSize && !isSvg) {
res.header('Content-Length', fileSize); res.header('Content-Length', fileSize);
} }
@@ -99,6 +99,7 @@ export class AttachmentService {
if (isUpdate) { if (isUpdate) {
attachment = await this.attachmentRepo.updateAttachment( attachment = await this.attachmentRepo.updateAttachment(
{ {
fileSize: preparedFile.fileSize,
updatedAt: new Date(), updatedAt: new Date(),
}, },
attachmentId, attachmentId,