Commit ac0acded authored by jvoisin's avatar jvoisin

Fix supported filelist filtering

Previously, only a subset of the fileformat supported
by mat2 were allowed by the frontend.

This fixes #23
parent af0ad652
Pipeline #24622 passed with stages
in 1 minute and 21 seconds
......@@ -61,7 +61,8 @@ def upload_file():
mimetypes = set()
for parser in parser_factory._get_parsers():
mimetypes |= set(map(mtype.guess_extension, parser.mimetypes))
for m in parser.mimetypes:
mimetypes |= set(mtype.guess_all_extensions(m, strict=False))
# since `guess_extension` might return `None`, we need to filter it out
mimetypes = sorted(filter(None, mimetypes))
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment