Upload photos on the mobile side

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.