I just want to say that these two days encountered this image upload the threshold, almost want to cut people. Encountered a lot of problems: such as the Base64url to the background is too large, causing the page to lose control automatically closed, such as the image to the background is always empty. Tried a lot of methods, always appear repeatedly problems.
Finally found a more convenient, less code, the application is relatively simple plug-in, here I would like to thank the author, although do not know who.
Application scenario: Mobile phone albums and camera calls, upload images to the interface to identify
Plugin download Baidu Cloud address: Link: Https://pan.baidu.com/s/1YgMVGbOGUcb22P3SBstJLA Password: 95ma
Text Code:
<! DOCTYPE html>
<meta charset= "UTF-8";
<title></title>
<body>
< a href= "" Class= "fr mr1 upfile-btn"-id= "js-showtips";
Take license Auto Fill < Input id= "uplicense" type= "file" Name= "Uplicense" capture= "Camera" accept= "image/*";
</a>
</body
<script src= "js/jquery.min.js" type= "Text/javascript" charset= "Utf-8" ></SCRIPT>
<script Src= "Ajaxfileupload.js" type= "Text/javascript" charset= "Utf-8" ></SCRIPT>
<script type= "text/ JavaScript "
$ (' #upLicense '). Bind (' Change ', function () {
$.ajaxfileupload ({
URL: '/wap/insurance- Licenserecon.html ',//Processing picture script
Secureuri:false,
Type: ' Post ',
Data: {img: ' uplicense ', type: ' 6 '}, fileelementid: ' Uplicense ',//file control ID
DataType: ' json ',
Success:function (JSON, status) {
}
})
})
</script>
Upload photos on the mobile side