Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix importing servers in Firefox for Android #1135

Merged
merged 1 commit into from
Apr 11, 2024

Conversation

acelaya
Copy link
Member

@acelaya acelaya commented Apr 11, 2024

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%20accept

With 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.

Copy link

Copy link

codecov bot commented Apr 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.59%. Comparing base (b399523) to head (0e0ea3f).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1135   +/-   ##
========================================
  Coverage    85.59%   85.59%           
========================================
  Files           55       55           
  Lines         2277     2277           
  Branches       306      306           
========================================
  Hits          1949     1949           
  Misses          23       23           
  Partials       305      305           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@acelaya acelaya merged commit b9fb398 into shlinkio:develop Apr 11, 2024
7 checks passed
@acelaya acelaya deleted the feature/fix-firefox-import branch April 11, 2024 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Not able to import servers in Firefox for Android
1 participant