cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Song (JIRA)" <>
Subject [jira] [Created] (CB-10019) window.resolveLocalFileSystemURL() callback not working
Date Tue, 17 Nov 2015 00:36:10 GMT
David Song created CB-10019:

             Summary: window.resolveLocalFileSystemURL() callback not working
                 Key: CB-10019
             Project: Apache Cordova
          Issue Type: Bug
          Components: Plugin File
         Environment: Android
            Reporter: David Song

I'm using ngcordova camera and trying to upload the image to google drive. Testing on android
with ionic view and for viewing logs.

For my code, the only log output I get is 'got uri file:///storage/emulated/0/Android/data/com.ionic.viewapp/cache/1447714232041.jpg'
and nothing else such as 'trying to read file' inside the resolveLocalFileSystemURL function.

I've seen previous issues such as but is there
anything wrong with my image file path? Any help would be greatly appreciated!


       var options = {
               quality: 75,
               destinationType: Camera.DestinationType.FILE_URI,
               encodingType: Camera.EncodingType.JPEG,
               correctOrientation: true,
               saveToPhotoAlbum: false
       $cordovaCamera.getPicture(options).then(function(uri) {

        console.log('got uri ' + uri);
        window.resolveLocalFileSystemURL(uri, function(fileEntry) {

          console.log('trying to read file');
          fileEntry.file(function(file) {
            console.log('file read');
            // (MediaUploader is this
            var uploader = new MediaUploader({
              file: file,
              token: access_token,
              onComplete: function(res) {
                console.log("Upload successful " + res);
              onError: function(res) {
                console.log('Upload not successful ' + res);

          }, function(err) {
        }, function(err) {
      }, function(err) {

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message