You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Tony OHagan (JIRA)" <ji...@apache.org> on 2014/08/30 17:36:53 UTC

[jira] [Commented] (CB-7270) Cordova 3.5.0-0.2.4

    [ https://issues.apache.org/jira/browse/CB-7270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14116429#comment-14116429 ] 

Tony OHagan commented on CB-7270:
---------------------------------

Confirming the same behaviour for 3.5.0.  
I used this code sample from Sencha Touch that has basically the same call.
destinationType.FILE_URI returned a content:// URI path
Tested on Android KitKat 4.4.2 Galaxy S5 using Geny Motion emulator.

http://phonegap.com/blog/2013/11/20/SenchaPhoneGap/

> Cordova 3.5.0-0.2.4
> -------------------
>
>                 Key: CB-7270
>                 URL: https://issues.apache.org/jira/browse/CB-7270
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Camera, Plugin File Transfer
>    Affects Versions: 3.5.0
>         Environment: Android
>            Reporter: Mitesh
>
> I am using the the camera plugin:
> Below is the code to demonstrate what I am trying to achieve:
> pictureSource=navigator.camera.PictureSourceType;
> destinationType=navigator.camera.DestinationType;
>     
>     navigator.camera.getPicture(onPhotoURISuccess, onFail, { quality: 50, 
>       destinationType: destinationType.FILE_URI,
>       sourceType: pictureSource.PHOTOLIBRARY });
> function onPhotoURISuccess(imageURI) {
> alert(imageURI);
> // returns 'content:///123456'
> window.resolveLocalFileSystemURL(imageURI, function(fileEntry){
>   alert(fileEntry.toURL());
>   file_url = fileEntry.toURL();
>   // returns 'file:///image.jpg'
>    var options = new FileUploadOptions();
>    options.fileKey = "file";
>    options.fileName =     file_url.substr(file_url.lastIndexOf('/') + 1);
>    // but the file transfer is not working, as the file uri is not in the formate of cdvfile://image.jpg as specified in the file transfer doc.
>    var ft = new FileTransfer();
>    ft.upload($scope.file_url, encodeURI(server_url), win, fail, options);
> })
> }
> Camera image selector on success it is returning the wrong file url, please let me know how to fix this.



--
This message was sent by Atlassian JIRA
(v6.2#6252)