In the previous project, uploadify(flash version) was used to realize the image upload function. The upload plug-in browser that relies on flash is not compatible enough, so Huploadify was used to replace uploadify for the following reasons:
1. Does not depend on flash.
2. The library file size is one third of uploadify.
3. Browser compatibility test, support ie11, Firefox (version 33.1.1), chrome (version 38.0.2125), mobile support Android, iPhone image upload (other browsers are not tested).
4. Do not change the server.
1, Next, install Huploadify:
git download address: https://github.com/Double-Lv/Huploadify
After downloading, the following css and JS files will be introduced in the head (jquery.Huploadify.js will be introduced after the jQuery library file):
2, Upload code:
html is as follows
js is as follows
3, Configuration of Huploadify
Open jquery.Huploadify.js to see the complete configuration items of Huploadify, as follows:
You can basically understand the notes. If you don 't understand, you can find the corresponding method definition and the use conditions of the knowable method. For example