mirror of
https://gitee.com/wonderful-code/buildadmin
synced 2024-11-21 22:55:36 +00:00
fix(baInput):文件后缀名大写时无法上传的问题
This commit is contained in:
parent
631bfe223e
commit
788e41e877
@ -210,7 +210,7 @@ export const checkFileMimetype = (fileName: string, fileType: string) => {
|
||||
const siteConfig = useSiteConfig()
|
||||
const mimetype = siteConfig.upload.mimetype.toLowerCase().split(',')
|
||||
|
||||
const fileSuffix = fileName.substring(fileName.lastIndexOf('.') + 1)
|
||||
const fileSuffix = fileName.substring(fileName.lastIndexOf('.') + 1).toLowerCase()
|
||||
if (siteConfig.upload.mimetype === '*' || mimetype.includes(fileSuffix) || mimetype.includes('.' + fileSuffix)) {
|
||||
return true
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user