Skip to content

Commit

Permalink
fix(android): handle input file with multiple accept mimetypes (#1988)
Browse files Browse the repository at this point in the history
  • Loading branch information
wslaghekke authored and jcesarmobile committed Sep 24, 2019
1 parent ed6647b commit 52f083d
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,10 @@ private void showFilePicker(final ValueCallback<Uri[]> filePathCallback, FileCho
if (fileChooserParams.getMode() == FileChooserParams.MODE_OPEN_MULTIPLE) {
intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
}
if (fileChooserParams.getAcceptTypes().length > 1) {
intent.setType("*/*");
intent.putExtra(Intent.EXTRA_MIME_TYPES, fileChooserParams.getAcceptTypes());
}
try {
bridge.cordovaInterface.startActivityForResult(new CordovaPlugin() {
@Override
Expand Down

0 comments on commit 52f083d

Please sign in to comment.