mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-01-19 03:42:52 +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) {
|
function getPictureWin(data) {
|
||||||
setPicture(data);
|
setPicture(data);
|
||||||
// TODO: Fix resolveLocalFileSystemURI to work with native-uri.
|
// 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) {
|
resolveLocalFileSystemURI(data, function (e) {
|
||||||
fileEntry = e;
|
fileEntry = e;
|
||||||
logCallback('resolveLocalFileSystemURI()', true)(e.toURL());
|
logCallback('resolveLocalFileSystemURI()', true)(e.toURL());
|
||||||
}, logCallback('resolveLocalFileSystemURI()', false));
|
}, logCallback('resolveLocalFileSystemURI()', false));
|
||||||
} else if (pictureUrl.indexOf('data:image/jpeg;base64' == 0)) {
|
} else if (pictureUrl.indexOf('data:image/jpeg;base64') == 0) {
|
||||||
// do nothing
|
// do nothing
|
||||||
} else {
|
} else {
|
||||||
var path = pictureUrl.replace(/^file:\/\/(localhost)?/, '').replace(/%20/g, ' ');
|
var path = pictureUrl.replace(/^file:\/\/(localhost)?/, '').replace(/%20/g, ' ');
|
||||||
|
Loading…
Reference in New Issue
Block a user