fix: upload remote image preview (#9952)
This commit is contained in:
parent
82033af097
commit
78b74cce8e
7 changed files with 50 additions and 33 deletions
|
|
@ -43,10 +43,13 @@ export const fileUpload: FileUpload = ({
|
|||
})
|
||||
}
|
||||
|
||||
export const getFileExtension = (fileName: string, fileMimetype: string) => {
|
||||
export const getFileExtension = (fileName: string, fileMimetype: string, isRemote?: boolean) => {
|
||||
if (fileMimetype)
|
||||
return mime.getExtension(fileMimetype) || ''
|
||||
|
||||
if (isRemote)
|
||||
return ''
|
||||
|
||||
if (fileName) {
|
||||
const fileNamePair = fileName.split('.')
|
||||
const fileNamePairLength = fileNamePair.length
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue