mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-01-19 03:42:52 +08:00
simplify picture.copyAsync
This commit is contained in:
parent
a201722f6d
commit
dca4b9c82b
@ -807,9 +807,9 @@ function savePhoto(picture, options, successCallback, errorCallback) {
|
|||||||
pictureName = pictureName.replace(/\.png$/, ".jpg");
|
pictureName = pictureName.replace(/\.png$/, ".jpg");
|
||||||
}
|
}
|
||||||
|
|
||||||
picture
|
picture.copyAsync(getAppData().localFolder, pictureName, OptUnique).done(function (copiedFile) {
|
||||||
.copyAsync(getAppData().localFolder, pictureName, OptUnique)
|
successCallback('ms-appdata:///local/' + copiedFile.name);
|
||||||
.done(function (copiedFile) { successCallback("ms-appdata:///local/" + copiedFile.name); }, errorCallback);
|
}, errorCallback);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (options.targetHeight > 0 && options.targetWidth > 0) {
|
if (options.targetHeight > 0 && options.targetWidth > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user