From 5165fc05fb88aeebd35616da40b7011004db0c54 Mon Sep 17 00:00:00 2001 From: Bruce Hayles Date: Mon, 22 Jan 2018 16:44:43 -0800 Subject: [PATCH] adding file type to images selected on windows --- src/windows/ImagePickerProxy.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/windows/ImagePickerProxy.js b/src/windows/ImagePickerProxy.js index 1d3727f8..865867c7 100644 --- a/src/windows/ImagePickerProxy.js +++ b/src/windows/ImagePickerProxy.js @@ -1,3 +1,4 @@ + var ApplicationData = Windows.Storage.ApplicationData; var Imaging = Windows.Graphics.Imaging; @@ -53,8 +54,8 @@ function getPictures(success, error, options) { return inputFile.openAsync(Windows.Storage.FileAccessMode.read).then(function (stream) { inputStream = stream; - return tempFolder.createFileAsync("tmpImage", Windows.Storage.CreationCollisionOption.generateUniqueName); - }).then(function (file) { + return tempFolder.createFileAsync('tmpImage' + fileType, Windows.Storage.CreationCollisionOption.generateUniqueName); + }.bind(this)).then(function (file) { outputFile = file; return outputFile.openAsync(Windows.Storage.FileAccessMode.readWrite); }).then(function (output) {