The use of the method is very simple, is to refer to the JS file, and then configure in JS to upload the address to be able to
<script type="text/javascript" src="./js/jquery.js"> </script> <script type="text/javascript" src="./js/ Webuploader.js"></script> <script type="text/javascript " src="./js/upload.js"></script>
What I do is add goods,
1. First accept the picture, then save it to the database, save the ID and save it to the cookie.
2. Click Save, save the product information, find the image ID from the cookie and add it to the product information. Empty cookies.
When you do, if you upload three images, you can only read from the cookie to the last image ID, the first two sheets are not.
For a long time why ah ...
It was later discovered that there was this parameter when the upload was instantiated:
threads
{Boolean} [optional] [default: 3] upload concurrency number. The maximum number of simultaneous upload processes allowed.
It turned out he was a piece of upload, I changed it to 1.
Uploading pictures using Webuploader