0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-07-04 22:57:34 -04:00
gitea/web_src/js/render/plugin.ts
Kerwin Bryant 176962c03e
Add support for 3D/CAD file formats preview (#34794)
Fix #34775 

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-06-30 16:12:25 +08:00

11 lines
297 B
TypeScript

export type FileRenderPlugin = {
// unique plugin name
name: string;
// test if plugin can handle a specified file
canHandle: (filename: string, mimeType: string) => boolean;
// render file content
render: (container: HTMLElement, fileUrl: string, options?: any) => Promise<void>;
}