Update README.md

This commit is contained in:
dmcBig
2018-04-20 17:08:45 +08:00
committed by GitHub
parent bce2b63e0c
commit 654a8b559d
+3
View File
@@ -35,6 +35,7 @@ index.js code:
'maxSelectSize':188743680,//188743680=180M (Optional)
};
document.getElementById('openBtn').onclick=function(){
MediaPicker.getMedias(args,function(dataArray){
//dataArray [{mediaType: "image", path:'/storage/emulated/0/DCIM/Camera/20170808_145202.jpg', path:'/storage/emulated/0/DCIM/Camera/20170808_145202.jpg'}]
@@ -42,6 +43,7 @@ index.js code:
},err())
};
function getThumbnail(dataArray){
for(var i=0; i<dataArray.length; i++){
//dataArray[i].thumbnailQuality=50; (Optional)
@@ -53,6 +55,7 @@ index.js code:
}
}
document.getElementById('uploadBtn').onclick=function() {
//please: cordova plugin add cordova-plugin-file-transfer
//see: https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file-transfer/index.html