var uploadInst = upload.render({
elem: '#btn-load' //绑定元素
,url: context+'upload'
,exts:'jpg|png|gif|bmp|jpeg'
,choose: function(obj){
obj.preview(function (index,file,result) {
console.log('preProcess')
console.log(index)
console.log(file)
console.log(result) // base64
console.log('preProcess')
})
}
,done: function(res){
//上传完毕回调
console.info(res);
}
,error: function(){
//请求异常回调
}
});
Layui upload组件获取文件进行预处理
最新推荐文章于 2024-01-06 16:38:16 发布