Skip to content

Commit abaa5aa

Browse files
committed
insert file path fix
1 parent e7ac062 commit abaa5aa

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/sn-editor-react/src/tinymce/controls/repo-file-plugin.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,10 @@ export const RepoFilePluginControl: React.FC<RepoFilePluginControlProps> = ({ ed
9494
const content = selection
9595
.filter((item) => item.IsFile)
9696
.map((item) => {
97-
const href = `${item.Path.replace(/^\/+/, '')}`.replace('/Content', '')
9897
const size = item.Size ? `(${(item.Size / 1024).toFixed(0)} KB)` : ''
9998
return `<div class="download">
10099
<div>${item.DisplayName}</div>
101-
<a href="${href}" target="_blank" rel="noopener">Download</a> ${size}
100+
<a href="${item.Path}" target="_blank" rel="noopener">Download</a> ${size}
102101
</div>
103102
<p>&nbsp;</p>`
104103
})

0 commit comments

Comments
 (0)