You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/04/01 07:10:39 UTC

[GitHub] [cordova-android] gabriele-sacchi opened a new pull request #706: Android - Added validation of mime types for fileChooserParams. Fixes…

gabriele-sacchi opened a new pull request #706: Android - Added validation of mime types for fileChooserParams. Fixes…
URL: https://github.com/apache/cordova-android/pull/706
 
 
   ### Platforms affected
   Android
   
   ### Motivation and Context
   This PR solved the issue raised [here](https://github.com/apache/cordova-android/issues/695). 
   
   [ng-file-upload](https://github.com/danialfarid/ng-file-upload/issues/2111) without this change does not work with Cordova. This issue on their repository had been raised a while back and many users had this unsolved issue: https://github.com/danialfarid/ng-file-upload/issues/480
   
   ### Description
   Added mime types validator/generator in case the mime types passed in through fileChooserParams are not valid. Defaults to "*/*" if not valid mime type is found.
   
   ### Testing
   Tested on Android simulator and physical device. The file picker is now correctly opened using ng-file-upload.
   
   Utility method tested with various inputs.
   Eg. 
   - new String[]{null, ".zip", "application/zip", ".pdf", "image/tiff", "text/plain", "boh/bah"}
   - new String[]{".jpg,.png,.tiff,.jpeg,.tif,.pdf"};
   - new String[]{}
   
   ### Checklist
   
   - [X] I've run the tests to see all new and existing tests pass
   - [X] I added automated test coverage as appropriate for this change
   - [V] Commit is prefixed with `(platform)` if this change only applies to one platform (e.g. `(android)`)
   - [V] If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct [keyword to close issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/))
   - [X] I've updated the documentation if necessary
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org