From c160214b5f9277e8a0ecfd1327d1df2e2709aeca Mon Sep 17 00:00:00 2001 From: NoelKova Date: Mon, 22 Jul 2024 11:21:47 +0200 Subject: [PATCH] download_and_preview_fix_on_file_overwrite --- apps/sensenet/src/components/Icon.tsx | 6 +++--- apps/sensenet/src/components/view-controls/image-view.tsx | 6 +++++- .../sn-controls-react/src/fieldcontrols/file-upload.tsx | 2 +- packages/sn-hooks-react/src/hooks/use-download.ts | 4 ++-- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/apps/sensenet/src/components/Icon.tsx b/apps/sensenet/src/components/Icon.tsx index 4f4b86428..237efa12a 100644 --- a/apps/sensenet/src/components/Icon.tsx +++ b/apps/sensenet/src/components/Icon.tsx @@ -228,13 +228,13 @@ export const defaultContentResolvers: Array> = [ width={options.style?.width || 32} height={options.style?.width || 32} alt="" - src={PathHelper.joinPaths( + src={`${PathHelper.joinPaths( options.repo.configuration.repositoryUrl, item.Path, '/Previews', item.Version as string, 'thumbnail1.png', - )} + )}?t=${Date.now()}`} style={options.style} /> ) : null, @@ -246,7 +246,7 @@ export const defaultContentResolvers: Array> = [ width={options.style?.width || 32} height={options.style?.width || 32} alt="" - src={PathHelper.joinPaths(options.repo.configuration.repositoryUrl, item.Path)} + src={`${PathHelper.joinPaths(options.repo.configuration.repositoryUrl, item.Path)}?t=${Date.now()}`} style={options.style} /> ) : null, diff --git a/apps/sensenet/src/components/view-controls/image-view.tsx b/apps/sensenet/src/components/view-controls/image-view.tsx index 513c6a04e..9d3f2ef60 100644 --- a/apps/sensenet/src/components/view-controls/image-view.tsx +++ b/apps/sensenet/src/components/view-controls/image-view.tsx @@ -91,7 +91,11 @@ export const ImageView: React.FC = (props) => {
- +