MUI上传文件的方法

时间:2021-05-17 04:53:50
<!doctype html>
<html> <head>
<meta charset="UTF-8">
<title></title>
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<link href="css/mui.min.css" rel="stylesheet" />
</head> <body> <button onclick="createUpload();">点我</button> <script src="js/mui.min.js"></script>
<script type="text/javascript">
mui.init() function createUpload() {
console.log();
var task = plus.uploader.createUpload( "http://47.94.245.189:807/abldoctor/upload/upload",
{ method:"POST",blocksize:,priority: },
function ( t, status ) {
// 上传完成
console.log(t);
if ( status == ) {
alert( "Upload success: " + t.url );
} else {
alert( "Upload failed: " + status );
}
}
);
task.addFile('images/touxiang2x.png', {key:"file"} );
task.start();
}
</script>
</body> </html>

MUI上传文件的方法