mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
feat: additional drag and drop image format support (webp, bmp, ico) (#5749)
Update constants.ts
This commit is contained in:
parent
3298aaf0c7
commit
d1441afec9
1 changed files with 6 additions and 0 deletions
|
@ -99,6 +99,9 @@ export const MIME_TYPES = {
|
||||||
"excalidraw.png": "image/png",
|
"excalidraw.png": "image/png",
|
||||||
jpg: "image/jpeg",
|
jpg: "image/jpeg",
|
||||||
gif: "image/gif",
|
gif: "image/gif",
|
||||||
|
webp: "image/webp",
|
||||||
|
bmp: "image/bmp",
|
||||||
|
ico: "image/x-icon",
|
||||||
binary: "application/octet-stream",
|
binary: "application/octet-stream",
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
|
@ -180,6 +183,9 @@ export const ALLOWED_IMAGE_MIME_TYPES = [
|
||||||
MIME_TYPES.jpg,
|
MIME_TYPES.jpg,
|
||||||
MIME_TYPES.svg,
|
MIME_TYPES.svg,
|
||||||
MIME_TYPES.gif,
|
MIME_TYPES.gif,
|
||||||
|
MIME_TYPES.webp,
|
||||||
|
MIME_TYPES.bmp,
|
||||||
|
MIME_TYPES.ico,
|
||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
export const MAX_ALLOWED_FILE_BYTES = 2 * 1024 * 1024;
|
export const MAX_ALLOWED_FILE_BYTES = 2 * 1024 * 1024;
|
||||||
|
|
Loading…
Add table
Reference in a new issue