Merge pull request #38 from mixingyu/master

修复了小问题
This commit is contained in:
DMC
2018-09-09 12:12:49 +08:00
committed by GitHub
3 changed files with 7 additions and 2 deletions

5
.npmignore Normal file
View File

@@ -0,0 +1,5 @@
node_modules
npm-debug.log
/www/demo/android.gif
/www/demo/ios.gif

View File

@@ -97,7 +97,7 @@ document.addEventListener("MediaPicker.CompressVideoEvent", function(data) {
| Android | iOS |
|:---------------:|:------------:|
| <img src="https://github.com/DmcSDK/cordova-plugin-mediaPicker/blob/master/www/demo/Screenshots1.png" width="270px" height="480"> | <img src="https://github.com/DmcSDK/cordova-plugin-mediaPicker/blob/master/www/demo/ios.png" width="270px" height="480"> |
| <img src="https://raw.githubusercontent.com/DmcSDK/cordova-plugin-mediaPicker/master/www/demo/Screenshots1.png" width="270px" height="480"> | <img src="https://raw.githubusercontent.com/DmcSDK/cordova-plugin-mediaPicker/master/www/demo/ios.png" width="270px" height="480"> |
[My Android Source GitHub:](https://github.com/dmcBig/MediaPickerPoject) https://github.com/dmcBig/MediaPickerPoject</br>

View File

@@ -237,7 +237,7 @@ public class MediaPicker extends CordovaPlugin {
if(quality<100) {
File file = compressImage(path, quality);
jsonObject.put("path", file.getPath());
jsonObject.put("uri", Uri.fromFile(file.getPath()));
jsonObject.put("uri", Uri.fromFile(new File(file.getPath())));
jsonObject.put("size", file.length());
jsonObject.put("name", file.getName());
callbackContext.success(jsonObject);