mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-01-18 19:22:51 +08:00
CB-7413 Resolve 'ms-appdata' URIs with File plugin
+ typo fix in data URI check
This commit is contained in:
parent
986bf6fd3c
commit
05da230c2a
@ -141,12 +141,12 @@ exports.defineManualTests = function (contentEl, createActionButton) {
|
||||
function getPictureWin(data) {
|
||||
setPicture(data);
|
||||
// TODO: Fix resolveLocalFileSystemURI to work with native-uri.
|
||||
if (pictureUrl.indexOf('file:') == 0 || pictureUrl.indexOf('content:') == 0) {
|
||||
if (pictureUrl.indexOf('file:') == 0 || pictureUrl.indexOf('content:') == 0 || pictureUrl.indexOf('ms-appdata:') === 0) {
|
||||
resolveLocalFileSystemURI(data, function (e) {
|
||||
fileEntry = e;
|
||||
logCallback('resolveLocalFileSystemURI()', true)(e.toURL());
|
||||
}, logCallback('resolveLocalFileSystemURI()', false));
|
||||
} else if (pictureUrl.indexOf('data:image/jpeg;base64' == 0)) {
|
||||
} else if (pictureUrl.indexOf('data:image/jpeg;base64') == 0) {
|
||||
// do nothing
|
||||
} else {
|
||||
var path = pictureUrl.replace(/^file:\/\/(localhost)?/, '').replace(/%20/g, ' ');
|
||||
|
Loading…
Reference in New Issue
Block a user