This commit is contained in:
Your Name 2018-09-09 09:33:09 +08:00
parent cc190a020c
commit 1c61c12d88
2 changed files with 6 additions and 1 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

@ -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);