Merge pull request #41 from btzr-io/patch-4

Add 3D-file support for getMediaType function
This commit is contained in:
Sean Yesmunt 2018-06-04 23:16:43 -04:00 committed by GitHub
commit 0239589369
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -117,6 +117,7 @@ Lbry.getMediaType = (contentType, fileName) => {
[/^.+\.(mp4|m4v|webm|flv|f4v|ogv)$/i, 'video'],
[/^.+\.(mp3|m4a|aac|wav|flac|ogg|opus)$/i, 'audio'],
[/^.+\.(html|htm|xml|pdf|odf|doc|docx|md|markdown|txt|epub|org)$/i, 'document'],
[/^.+\.(stl|obj|fbx|gcode)$/i, '3D-file'],
];
const res = formats.reduce((ret, testpair) => {
switch (testpair[0].test(ret)) {