Kilu.He 14f789f50b
fix: support upload and render image(.git, .webp, .svg) (#4841)
* fix: add supported extension of image

* fix: display of select options when no typing

* chore: focus end when cell input actived

* fix: modified checklist keyboard event
2024-03-08 14:15:57 +08:00

10 lines
290 B
TypeScript

export const MAX_IMAGE_SIZE = 10 * 1024 * 1024; // 10MB
export const ALLOWED_IMAGE_EXTENSIONS = ['jpg', 'jpeg', 'png', 'gif', 'svg', 'webp'];
export const IMAGE_DIR = 'images';
export function getFileName(url: string) {
const [...parts] = url.split('/');
return parts.pop() ?? url;
}