mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-02 10:29:02 +08:00
fix(AttachmentPreview): ext should not be case sensitive (#9426)
fix(AttachmentPreview): 修复图片扩展名大小写敏感问题
This commit is contained in:
parent
4833f36e0b
commit
375f966e9a
@ -83,7 +83,7 @@ export const getFileIcon = (type?: string) => {
|
||||
export const FileNameRender: FC<{ file: FileMetadata }> = ({ file }) => {
|
||||
const [visible, setVisible] = useState<boolean>(false)
|
||||
const isImage = (ext: string) => {
|
||||
return ['.png', '.jpg', '.jpeg', '.gif', '.bmp', '.webp'].includes(ext)
|
||||
return ['.png', '.jpg', '.jpeg', '.gif', '.bmp', '.webp'].includes(ext.toLocaleLowerCase())
|
||||
}
|
||||
|
||||
const fullName = FileManager.formatFileName(file)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user