You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/02/01 23:22:39 UTC
[jira] [Commented] (CB-10270) camera.getPicture() returns an empty
string
[ https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15127159#comment-15127159 ]
ASF GitHub Bot commented on CB-10270:
-------------------------------------
GitHub user riknoll opened a pull request:
https://github.com/apache/cordova-plugin-camera/pull/160
CB-10270 android: Added back support for file:// URIs to getRealPath
Our `getRealPath()` function is unable to handle `file: //` URIs, which can occasionally lead it to return an empty string for the result URI. These camera options reproduce when you select an image from the Gallery app:
```
{
destinationType: Camera.DestinationType.FILE_URI,
sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
allowEdit: true,
correctOrientation: true
}
```
I believe that we used to do something similar to this, but it was removed at some point in the past. @infil00p do you have any idea why that was?
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/MSOpenTech/cordova-plugin-camera CB-10270
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cordova-plugin-camera/pull/160.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 #160
----
commit ee06d3efb233d5404d0aeda2abe08e6fd765c7fe
Author: riknoll <ri...@gmail.com>
Date: 2016-01-29T23:47:00Z
CB-10270 android: Added back support for file:// URIs to getRealPath
----
> camera.getPicture() returns an empty string
> -------------------------------------------
>
> Key: CB-10270
> URL: https://issues.apache.org/jira/browse/CB-10270
> Project: Apache Cordova
> Issue Type: Bug
> Components: Plugin Camera
> Affects Versions: 2.1.0
> Environment: Android 4.4.2 (api 19)
> Reporter: Alexander Sorokin
> Assignee: Richard B Knoll
> Priority: Critical
> Labels: android, reproduced, triaged
> Attachments: mobilespec-camera.7z
>
>
> Code sample to reproduce:
> {code}
> navigator.camera.getPicture(onSuccess, onFail, {
> destinationType: Camera.DestinationType.FILE_URI,
> sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
> correctOrientation: true
> });
> {code}
> {{onSuccess}} is called with an empty string as an argument.
> if {{correctOrientation}} is {{false}}, everything works as expected.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org