Skip to content

Build your personal knowledge base with Trilium Notes

feat(attachments): display MIME type

Elian Doranc7bb5ff119e9
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json
index a506888741..3d4f50bd0d 100644
--- a/apps/client/src/translations/en/translation.json
+++ b/apps/client/src/translations/en/translation.json
@@ -1618,7 +1618,7 @@
"will_be_deleted_in": "This attachment will be automatically deleted in {{time}}",
"will_be_deleted_soon": "This attachment will be automatically deleted soon",
"deletion_reason": ", because the attachment is not linked in the note's content. To prevent deletion, add the attachment link back into the content or convert the attachment into note.",
- "role_and_size": "Role: {{role}}, Size: {{size}}",
+ "role_and_size": "Role: {{role}}, size: {{size}}, MIME: {{- mimeType}}",
"link_copied": "Attachment link copied to clipboard.",
"unrecognized_role": "Unrecognized attachment role '{{role}}'."
},
diff --git a/apps/client/src/widgets/type_widgets/Attachment.tsx b/apps/client/src/widgets/type_widgets/Attachment.tsx
index f270bcdae7..95bc3c340c 100644
--- a/apps/client/src/widgets/type_widgets/Attachment.tsx
+++ b/apps/client/src/widgets/type_widgets/Attachment.tsx
@@ -195,7 +195,11 @@ function AttachmentInfo({ attachment, isFullDetail }: { attachment: FAttachment,
) : (attachment.title)}
</h4>
<div className="attachment-details">
- {t("attachment_detail_2.role_and_size", { role: attachment.role, size: utils.formatSize(attachment.contentLength) })}
+ {t("attachment_detail_2.role_and_size", {
+ role: attachment.role,
+ size: utils.formatSize(attachment.contentLength),
+ mimeType: attachment.mime
+ })}
</div>
<div style="flex: 1 1;" />
</div>