Explorar el Código

Merge pull request #452 from transloadit/more-extensions

add more extensions for mimetype detection
Artur Paikin hace 7 años
padre
commit
b2560a329e
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4 1
      src/core/Utils.js

+ 4 - 1
src/core/Utils.js

@@ -121,7 +121,10 @@ function getFileType (file) {
     'markdown': 'text/markdown',
     'mp4': 'video/mp4',
     '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