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(android): handle input file with multiple accept mimetypes #1988

Merged
merged 1 commit into from
Sep 24, 2019

Conversation

wslaghekke
Copy link
Contributor

@wslaghekke wslaghekke commented Sep 23, 2019

Currently when you add a file input with multiple mime-types in the accept attribute Capacitor will only use the first mimetype, this change make the file picker correctly use all specified mime-types.

Example of input thats currently broken:

<input type="file" accept="image/jpeg,image/png,application/pdf">

the example file input will only accept jpeg images instead of also accepting png and pdf's

Currently when you add a file input with multiple mime-types in the accept attribute Capacitor will only use the first mimetype, this change make the file picker correctly use all specified mime-types.
Copy link
Member

@jcesarmobile jcesarmobile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, I've tested and seems to work fine with mime types, but not with file extensions (that are also ok on the accept attribute).
Will merge as is and fix that in a separate PR.

@jcesarmobile jcesarmobile changed the title Handle filepicker with multiple mimetypes (Android) fix(android): handle input file with multiple accept mimetypes Sep 24, 2019
@jcesarmobile jcesarmobile merged commit 52f083d into ionic-team:master Sep 24, 2019
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.

2 participants