Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

Content-type in dash upload on windows

Perhaps this is more of a flask issue than a Dash issue, but using the last example code from I have the following problem:

If (on windows) I have the csv extension associated to Excel, then when I try to upload the csv file, it shows up as content-type: data:application/;base64.

Does anyone have some suggestions to better guess the input format in this case?

Edit: it looks like there is an update planned that would provide the filename – that would be good enough in my case.

@chubukov - Yeah, this will help. You should be able to access this property currently with the filename property.

Yeah, I should mention this in the docs. The mime-type is not super reliable across platforms. Even in the tests in that PR, the test linux machine displayed a different mime-type than on my MacOS machine.

Checking the suffix should be safer.