Pārlūkot izejas kodu

add more extensions for mimetype detection

Ifedapo Olarewaju 7 gadi atpakaļ
vecāks
revīzija
261726106f
1 mainītis faili ar 4 papildinājumiem un 1 dzēšanām
  1. 4 1
      src/core/Utils.js

+ 4 - 1
src/core/Utils.js

@@ -121,7 +121,10 @@ function getFileType (file) {
     'markdown': 'text/markdown',
     'markdown': 'text/markdown',
     'mp4': 'video/mp4',
     'mp4': 'video/mp4',
     'mp3': 'audio/mp3',
     'mp3': 'audio/mp3',
-    'svg': 'image/svg+xml'
+    'svg': 'image/svg+xml',
+    'jpg': 'image/jpeg',
+    'png': 'image/png',
+    'gif': 'image/gif'
   }
   }
 
 
   const fileExtension = file.name ? getFileNameAndExtension(file.name).extension : null
   const fileExtension = file.name ? getFileNameAndExtension(file.name).extension : null