GitHub user riknoll opened a pull request:

    https://github.com/apache/cordova-plugin-camera/pull/135

    CB-9960 android: Fixed FileNotFoundException for some gallery images

    Certain gallery applications (such as Google Photos) return `content://` 
URIs that our method of getting a file path (`FileHelper.getRealPath()`) fails 
to properly dereference. Using these applications with `cameraOptions` that 
cause the image to be edited (width/height, correctOrientation, allowEdit, 
etc.) would trigger a FileNotFoundException and cause the plugin to fail 
because it is unable to grab the original filename. This checks the result of 
`FileHelper.getRealPath()` and if it fails to grab a path instead uses the 
generic filename "modified.jpg" for the local file (which was the intended 
behavior before, we were just checking the result of `getRealPath()` 
incorrectly). Note: These images will lose their EXIF data (the Exifinterface 
needs a local file path, I think)

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/MSOpenTech/cordova-plugin-camera CB-9960

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-camera/pull/135.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #135
    
----
commit 338785b527e9a767fe717f95c920cda69e203ef6
Author: riknoll <richard.b.kn...@gmail.com>
Date:   2015-11-05T23:03:35Z

    CB-9960 android: Fixed FileNotFoundException for some gallery images

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org

Reply via email to