cordova-filechooser icon indicating copy to clipboard operation
cordova-filechooser copied to clipboard

permissions

Open DimaKajola opened this issue 7 years ago • 0 comments

Hi, I'm using your plugin in my project and recently I detected the next issue: if I try to get the file content console.log(base64); it displays an empty string. But if I used before the functionality of cordova-plugin-camera in the app ( picked some photo, etc) the issue is gone because in cordova-plugin-camera I was needed to Allow access permissions for the plugin. I'm new in Ionic and can't get the solution for this bug.

Here is my code sample: fileChooser.open(function (uri) { if ($scope.message_id) { var source_path; if (uri.indexOf('content://') === 0) { window.FilePath.resolveNativePath( uri, function (path) { window.plugins.Base64.encodeFile(path, function (base64) { console.log(base64); }); }, function (e) { /* don't do anything for now */ } ); } else { window.plugins.Base64.encodeFile(uri, function (base64) { console.log(base64); }); } } });

DimaKajola avatar Oct 30 '17 17:10 DimaKajola