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");
|
||||
}
|
||||
|
||||
picture
|
||||
.copyAsync(getAppData().localFolder, pictureName, OptUnique)
|
||||
.done(function (copiedFile) { successCallback("ms-appdata:///local/" + copiedFile.name); }, errorCallback);
|
||||
picture.copyAsync(getAppData().localFolder, pictureName, OptUnique).done(function (copiedFile) {
|
||||
successCallback('ms-appdata:///local/' + copiedFile.name);
|
||||
}, errorCallback);
|
||||
}
|
||||
} else {
|
||||
if (options.targetHeight > 0 && options.targetWidth > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user