add 3D-file support for getMediaType function

This commit is contained in:
Baltazar Gomez 2018-06-03 21:25:50 -06:00 committed by GitHub
parent a32e8835c2
commit 6d78689fa6
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)) {