Closed acelaya closed 5 months ago
https://shlinkio.github.io/shlink-web-client/feature/fix-firefox-import/
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 85.59%. Comparing base (
b399523
) to head (0e0ea3f
). Report is 1 commits behind head on develop.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Closes #1130
This PR changes the import servers file input from
accept="text/csv"
to"aceppt=".csv"
.The reason is that, with the former, Firefox for Android would not allow picking valid CSV files if they have spaces in their name.
The solution is not perfect, as now Firefox for Android allows to pick any file, but that's because it does not really support the
accept
attribute in file inputs. See https://caniuse.com/?search=input%20type%20file%20acceptWith this change, Chrome for Android also allows to pick any file, but that was already its behavior before.
On desktop browsers the filtering works as expected, with the only limitation that you no longer can pick CSV files that don't have the CSV extension, and you can pick non-CSV files if they have the csv extension. But those are probably edge cases.
In any cases, Shlink handles the parsing of the file and displays a proper error message if an invalid file is picked, so this should put us in a better situation.