input file 路径 fakepath 怎么解决
var imageURI = getPath($$("#share_introduction").val());myApp.alert(imageURI);
var options = new FileUploadOptions();
options.fileKey="share_introduction";//等同于file的name,后台获取的就是这个
options.fileName=imageURI.substr(imageURI.lastIndexOf('/')+1);
options.mimeType="image/jpeg";
options.chunkedMode = false;
var ft = new FileTransfer();
ft.upload(imageURI,
encodeURI(server_path+"manage/upload_introduction?productId="+productId+"&type="+productType+"&content="+content+"&title="+title+"&personId="+personId),
function(r) {
var json = JSON.parse(r.response);//后台返回值在这个r.response里,变成json格式获取
///二维码 "E:/Tomcat7.0/webapps/E-book/static/upload/"+productId+"/image"
},
function(error) {
myApp.alert("上传失败");
return ;
} , options);
页:
[1]