mirror of
https://github.com/docmost/docmost.git
synced 2026-05-07 06:23:06 +08:00
fix: diagrams SVG content length (#1928)
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user