js:
var task=plus.uploader.createUpload(server,
{method:"POST"},
function(t,status){ //上传完成
if(status==200){
//资源
var responseText = t.responseText;
//转换成json
var json = eval('(' + responseText + ')');
//上传文件的信息
var files = json.files;
//上传成功以后的保存路径
var img_url = files.uploadkey.url;
//ajax 写入数据库
var urls = 'http://tongle.dongyixueyuan.com'+img_url;
switch(num){
case '0':
img_element['0'].src = urls;
img_element['0'].setAttribute('img',img_url);
break;
case '2':
img_element['1'].src = urls;
img_element['1'].setAttribute('img',img_url);
break;
case '3':
img_element['2'].src = urls;
img_element['2'].setAttribute('img',img_url);
break;
}
//关闭转圈等待框
wt.close();
}else{
console.log("上传失败:"+status);
var json = eval('(' + responseText + ')');
console.log(json);
//关闭原生的转圈等待框
wt.close();
}
});
task.addData("client","");
task.addData("uid",getUid());
for(var i=0;i<files.length;i++){
var f=files[i];
console.info(f.path+"______"+f.name);
task.addFile(f.path,{key:f.name});
}
task.start();
python的后台如何接收值,并进行图片保存,不熟悉python,请教