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:
parent
90b080b7bb
commit
693b4ac98b
@ -752,7 +752,7 @@ def import_subscriptions():
|
|||||||
|
|
||||||
except (AssertionError, IndexError, defusedxml.ElementTree.ParseError) as e:
|
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
|
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')
|
content = file.read().decode('utf-8')
|
||||||
reader = csv.reader(content.splitlines())
|
reader = csv.reader(content.splitlines())
|
||||||
channels = []
|
channels = []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user