From 648f03a74bf6f0eaee86a6617510706ae3f1ebc5 Mon Sep 17 00:00:00 2001 From: Sabrina Bongiovanni Date: Thu, 14 Mar 2024 17:52:54 +0100 Subject: [PATCH] feat: added download link to filename in file widget --- .../volto/src/components/manage/Widgets/FileWidget.jsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/volto/src/components/manage/Widgets/FileWidget.jsx b/packages/volto/src/components/manage/Widgets/FileWidget.jsx index 4a717b97de..e35b015cad 100644 --- a/packages/volto/src/components/manage/Widgets/FileWidget.jsx +++ b/packages/volto/src/components/manage/Widgets/FileWidget.jsx @@ -9,7 +9,7 @@ import { Button, Image, Dimmer } from 'semantic-ui-react'; import { readAsDataURL } from 'promise-file-reader'; import { injectIntl } from 'react-intl'; import deleteSVG from '@plone/volto/icons/delete.svg'; -import { Icon, FormFieldWrapper } from '@plone/volto/components'; +import { Icon, FormFieldWrapper, UniversalLink } from '@plone/volto/components'; import loadable from '@loadable/component'; import { flattenToAppURL, validateFileUploadSize } from '@plone/volto/helpers'; import { defineMessages, useIntl } from 'react-intl'; @@ -170,7 +170,11 @@ const FileWidget = (props) => { )}
- {value && value.filename} + {value && ( + + {value.filename} + + )} {value && (