|
这是图片的上传,得到了一个base64转码文件
function onSuccess(imageData) {
//请求数据并显示popOver组件
var popOver1=self.comp('popOver1');
popOver1.show();
var smallImage = document.getElementById(self.getIDByXID('image1'));
smallImage.style.display = 'block';
smallImage.src = "data:image/jpeg;base64,"+imageData;
popOver1.hide();//请求完成后隐藏popOver组件
//图片上传
self.uploadPic(imageData);
}
function onFail(message) {
alert('Failed because: ' + message);
}
视频的是navigator.device.capture.captureVideo(captureSuccess, captureError, {limit : 1});
function captureSuccess(mediaData){
var i, path, len;
for (i = 0, len = mediaFiles.length; i < len; i += 1) {
path = mediaFiles[i].fullPath;
}
得到的是一个URL,
我要怎么才能获取跟图片一样或者类似的转码文件呢? |
|