diff --git a/client/src/components/attachments/Attachments/ItemContent.jsx b/client/src/components/attachments/Attachments/ItemContent.jsx
index 2312f12c..33389bf5 100644
--- a/client/src/components/attachments/Attachments/ItemContent.jsx
+++ b/client/src/components/attachments/Attachments/ItemContent.jsx
@@ -54,6 +54,19 @@ const ItemContent = React.forwardRef(({ id, onOpen }, ref) => {
}
}, [onOpen, attachment.data]);
+ const handleDownloadClick = useCallback(
+ (event) => {
+ event.stopPropagation();
+
+ const linkElement = document.createElement('a');
+ linkElement.href = attachment.data.url;
+ linkElement.download = attachment.data.filename;
+ linkElement.target = '_blank';
+ linkElement.click();
+ },
+ [attachment.data.url, attachment.data.filename],
+ );
+
const handleToggleCoverClick = useCallback(
(event) => {
event.stopPropagation();
@@ -114,25 +127,31 @@ const ItemContent = React.forwardRef(({ id, onOpen }, ref) => {
- {attachment.type === AttachmentTypes.FILE && attachment.data.image && canEdit && (
+ {attachment.type === AttachmentTypes.FILE && (
-
)}
diff --git a/client/src/components/attachments/Attachments/ItemContent.module.scss b/client/src/components/attachments/Attachments/ItemContent.module.scss
index 9b7b01f7..83ba13fe 100644
--- a/client/src/components/attachments/Attachments/ItemContent.module.scss
+++ b/client/src/components/attachments/Attachments/ItemContent.module.scss
@@ -52,6 +52,10 @@
outline: none;
padding: 0;
+ &:not(:last-child) {
+ margin-right: 10px;
+ }
+
&:hover {
color: #172b4d;
}