mirror of
https://github.com/docmost/docmost.git
synced 2026-08-30 02:25:01 +08:00
fix: image fallback regression (#1989)
* fix: image fallback regression * fix image preview on upload * fix image loading
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
import { Editor } from "@tiptap/core";
|
||||
|
||||
export function normalizeFileUrl(src: string): string {
|
||||
if (src && src.startsWith("/files/")) {
|
||||
return "/api" + src;
|
||||
}
|
||||
return src || "";
|
||||
}
|
||||
|
||||
export type UploadFn = (
|
||||
file: File,
|
||||
editor: Editor,
|
||||
|
||||
Reference in New Issue
Block a user