mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
274 B
8 lines
274 B
2 years ago
|
const imageExt = ['jpeg', 'gif', 'png', 'png', 'svg', 'bmp', 'ico', 'jpg', 'webp']
|
||
|
|
||
|
const isImage = (name: string, mimetype?: string) => {
|
||
|
return imageExt.some((e) => name?.toLowerCase().endsWith(`.${e}`)) || mimetype?.startsWith('image/')
|
||
|
}
|
||
|
|
||
|
export { isImage, imageExt }
|