mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-06 13:19:33 +08:00
fix: file extension to lowercase when uploading
This commit is contained in:
parent
ce837bc7ef
commit
ea657a3606
@ -273,7 +273,7 @@ export function getFileDirectory(filePath: string) {
|
|||||||
|
|
||||||
export function getFileExtension(filePath: string) {
|
export function getFileExtension(filePath: string) {
|
||||||
const parts = filePath.split('.')
|
const parts = filePath.split('.')
|
||||||
const extension = parts.slice(-1)[0]
|
const extension = parts.slice(-1)[0].toLowerCase()
|
||||||
return '.' + extension
|
return '.' + extension
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user