Add application/vnd.ms-excel as CSV mime type

Windows sends application/vnd.ms-excel as MIME Type instead of text/csv

Signed-off-by: Jesús <heckyel@hyperbola.info>
This commit is contained in:
Andreas 2021-12-29 22:48:06 +01:00 committed by Jesús
parent 90b080b7bb
commit 693b4ac98b
No known key found for this signature in database
GPG Key ID: F6EE7BC59A315766

View File

@ -752,7 +752,7 @@ def import_subscriptions():
except (AssertionError, IndexError, defusedxml.ElementTree.ParseError) as e:
return '400 Bad Request: Unable to read opml xml file, or the file is not the expected format', 400
elif mime_type == 'text/csv':
elif mime_type in ('text/csv', 'application/vnd.ms-excel'):
content = file.read().decode('utf-8')
reader = csv.reader(content.splitlines())
channels = []