mirror of
https://github.com/docmost/docmost.git
synced 2026-05-06 22:03:06 +08:00
fix svg content legth
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user