Fix filetype detection

This commit is contained in:
rinpatch 2018-11-27 16:10:35 +03:00 committed by Rinpatch
parent 91272dc555
commit cddb173089
1 changed files with 2 additions and 2 deletions

View File

@ -9,11 +9,11 @@ const fileType = (typeString) => {
type = 'image' type = 'image'
} }
if (typeString.match(/video\/(webm|mp4)/)) { if (typeString.match(/video/)) {
type = 'video' type = 'video'
} }
if (typeString.match(/audio|ogg/)) { if (typeString.match(/audio/)) {
type = 'audio' type = 'audio'
} }