ThangHuuVu opened a new issue #706:
URL: https://github.com/apache/cordova-plugin-camera/issues/706


   # Feature Request
   MIME-type filter for selecting from PHOTO ALBUM
   ## Motivation Behind Feature
   <!-- Why should this feature be implemented? What problem does it solve? -->
   Give the plugin the ability to select only certain MIME types of images. For 
example, this could help limit the options down to .jpeg and .png only on 
Android. Thus, it could prevent the users from picking .psd files from their 
library. 
   
   
   ## Feature Description
   <!-- 
   Describe your feature request in detail
   Please provide any code examples or screenshots of what this feature would 
look like
   Are there any drawbacks? Will this break anything for existing users? 
   -->
   As a developer using this plugin I would like to have a configurable option 
to filter certain MIME types that I want only. Something that can be done via 
the `cameraOptions` like:
   ```
   navigator.camera.getPicture(onBrowsePhotoSuccess, onBrowsePhotoFailed, {
      sourceType: pictureSource.PHOTOLIBRARY,
      mimeTypes: ["jpeg", "png",...] // only works when sourceType is not 
CAMERA.
   });
   ```
   
   
   ## Alternatives or Workarounds
   <!-- 
   Describe alternatives or workarounds you are currently using 
   Are there ways to do this with existing functionality?
   -->
   Our current workaround is relying on the returned file URI from the success 
callback and use regex to determine if the file type is valid or not. 
   


----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to