refac: HTML_FILE_ID handling
This commit is contained in:
1 parent
e52e45d613
commit
dadfa5f043
3 files changed
+20
-5
No files matched your search
@@ -41,8 +41,7 @@ export const replaceTokens = (content, sourceIds, char, user) => {
|
||||
},
|
||||
{
|
||||
regex: /{{HTML_FILE_ID_([a-f0-9-]+)}}/gi,
|
||||
replacement: (_, fileId) =>
|
||||
`<iframe src="${WEBUI_BASE_URL}/api/v1/files/${fileId}/content/html" width="100%" frameborder="0" onload="this.style.height=(this.contentWindow.document.body.scrollHeight+20)+'px';"></iframe>`
|
||||
replacement: (_, fileId) => `<file type="html" id="${fileId}" />`
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
Reference in new issue
Block a user