Skip to content

Commit d89f115

Browse files
committed
Modify the REGEX to support .mtl file
1 parent c4de266 commit d89f115

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

server/utils/fileUtils.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ export const fileExtensionsArray = [
4040
'frag',
4141
'bin',
4242
'xml',
43-
'stl'
43+
'stl',
44+
'mtl'
4445
];
4546

4647
export const mimeTypes = `image/*,audio/*,text/javascript,text/html,text/css,
@@ -68,8 +69,8 @@ export const STRING_REGEX = /(['"])((\\\1|.)*?)\1/gm;
6869
// these are files that have to be linked to with a blob url
6970
export const PLAINTEXT_FILE_REGEX = /.+\.(json|txt|csv|vert|frag|tsv|xml|stl)$/i;
7071
// these are files that users would want to edit as text (maybe svg should be here?)
71-
export const TEXT_FILE_REGEX = /.+\.(json|txt|csv|tsv|vert|frag|js|css|html|htm|jsx|xml|stl)$/i;
72+
export const TEXT_FILE_REGEX = /.+\.(json|txt|csv|tsv|vert|frag|js|css|html|htm|jsx|xml|stl|mtl)$/i;
7273
export const NOT_EXTERNAL_LINK_REGEX = /^(?!(http:\/\/|https:\/\/))/;
7374
export const EXTERNAL_LINK_REGEX = /^(http:\/\/|https:\/\/)/;
7475

75-
export const CREATE_FILE_REGEX = /.+\.(json|txt|csv|tsv|js|css|frag|vert|xml|html|htm|stl)$/i;
76+
export const CREATE_FILE_REGEX = /.+\.(json|txt|csv|tsv|js|css|frag|vert|xml|html|htm|stl|mtl)$/i;

0 commit comments

Comments
 (0)