diff --git a/src/windows/CameraProxy.js b/src/windows/CameraProxy.js index f648c63..9362be5 100644 --- a/src/windows/CameraProxy.js +++ b/src/windows/CameraProxy.js @@ -801,13 +801,11 @@ function savePhoto(picture, options, successCallback, errorCallback) { resizeImage(successCallback, errorCallback, picture, options.targetWidth, options.targetHeight, options.encodingType); } else { // CB-11714: check if target content-type is PNG to just rename as *.jpg since camera is captured as JPEG - var pictureName = picture.name; - if (options.encodingType === Camera.EncodingType.PNG) { - pictureName = pictureName.replace(/\.png$/, ".jpg"); + picture.name = picture.name.replace(/\.png$/, ".jpg"); } - picture.copyAsync(getAppData().localFolder, pictureName, OptUnique).done(function (copiedFile) { + picture.copyAsync(getAppData().localFolder, picture.name, OptUnique).done(function (copiedFile) { successCallback('ms-appdata:///local/' + copiedFile.name); }, errorCallback); }