Selaa lähdekoodia

Fix: type missing of remote file in chat (#9652)

tags/0.10.1
KVOJJJin 1 vuosi sitten
vanhempi
commit
d700abff0a
No account linked to committer's email address
1 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. 3
    3
      web/app/components/base/file-uploader/utils.ts

+ 3
- 3
web/app/components/base/file-uploader/utils.ts Näytä tiedosto

@@ -44,6 +44,9 @@ export const fileUpload: FileUpload = ({
}

export const getFileExtension = (fileName: string, fileMimetype: string) => {
if (fileMimetype)
return mime.getExtension(fileMimetype) || ''

if (fileName) {
const fileNamePair = fileName.split('.')
const fileNamePairLength = fileNamePair.length
@@ -52,9 +55,6 @@ export const getFileExtension = (fileName: string, fileMimetype: string) => {
return fileNamePair[fileNamePairLength - 1]
}

if (fileMimetype)
return mime.getExtension(fileMimetype) || ''

return ''
}


Loading…
Peruuta
Tallenna