Feature(custom): uppercase image ext is now recognized as image in manage

This commit is contained in:
Kuingsmile
2026-05-06 14:40:56 +08:00
parent 62f00d5c0c
commit db1b58fa46

View File

@@ -55,7 +55,9 @@ export const getRawData = (args: any): any => {
const getExtension = (fileName: string) => path.extname(fileName).slice(1)
export const isImage = (fileName: string) =>
['jpg', 'jpeg', 'png', 'gif', 'webp', 'bmp', 'ico', 'svg', 'avif'].includes(getExtension(fileName))
['jpg', 'jpeg', 'png', 'gif', 'webp', 'bmp', 'ico', 'svg', 'avif'].includes(
getExtension(fileName).toLocaleLowerCase(),
)
export let tray: Tray