mirror of
https://github.com/docmost/docmost.git
synced 2026-07-14 15:56:47 +10:00
16 lines
364 B
TypeScript
16 lines
364 B
TypeScript
import { Editor } from "@tiptap/core";
|
|
|
|
export type UploadFn = (
|
|
file: File,
|
|
editor: Editor,
|
|
pos: number,
|
|
pageId: string,
|
|
// only applicable to file attachments
|
|
allowMedia?: boolean,
|
|
) => void;
|
|
|
|
export interface MediaUploadOptions {
|
|
validateFn?: (file: File, allowMedia?: boolean) => void;
|
|
onUpload: (file: File, pageId: string) => Promise<any>;
|
|
}
|