Skip to content

Commit

Permalink
Merge branch 'feature/Tinymce-editor' of https://github.com/SenseNet/…
Browse files Browse the repository at this point in the history
…sn-client into feature/Tinymce-editor
  • Loading branch information
hassanad94 committed Jul 25, 2024
2 parents 8dbf96a + 878ec76 commit e123fe7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
6 changes: 3 additions & 3 deletions apps/sensenet/src/components/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,13 +228,13 @@ export const defaultContentResolvers: Array<IconResolver<GenericContent>> = [
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,
Expand All @@ -246,7 +246,7 @@ export const defaultContentResolvers: Array<IconResolver<GenericContent>> = [
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,
Expand Down
6 changes: 5 additions & 1 deletion apps/sensenet/src/components/view-controls/image-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@ export const ImageView: React.FC<ImageViewProps> = (props) => {
</div>
</div>
<div className={classes.imageContainer}>
<img className={classes.image} src={`${repository.configuration.repositoryUrl}${contentPath}`} alt="" />
<img
className={classes.image}
src={`${repository.configuration.repositoryUrl}${contentPath}?t=${Date.now()}`}
alt=""
/>
</div>
<div className={classes.buttonWrapper}>
<Button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export const FileUpload: React.FC<ReactClientFieldSetting<BinaryFieldSetting>> =
binaryPropertyName: props.settings.Name,
})

const newValue = `${getNameFromPath(e.target.value)}`
const newValue = `${getNameFromPath(e.target.value)}?t=${Date.now()}`
setFileName(newValue)
} catch (error) {
console.error(error.message)
Expand Down
4 changes: 2 additions & 2 deletions packages/sn-hooks-react/src/hooks/use-download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export const fakeClick = (obj: EventTarget) => {

export const downloadFile = (name: string, repositoryUrl: string) => {
const saveLink = document.createElement('a')
saveLink.href = `${repositoryUrl}${name}?download`
saveLink.target = '_blank';
saveLink.href = `${repositoryUrl}${name}?download?t=${Date.now()}`
saveLink.target = '_blank'
fakeClick(saveLink)
}

Expand Down

0 comments on commit e123fe7

Please sign in to comment.