Introduction to the function of flash avatar upload component
1. Support php, asp, jsp, asp.net calls
2. Support taking and saving avatar photos
3. Support upload success, js callback function
4. Good compatibility, any browser IE10, IE9, IE8, IE7IE6, firefox, chrome can be used normally
5. Upload and preview, users can select the area arbitrarily, and support avatar rotation
6. No matter whether the picture is too large or too small, it can be displayed in a fixed size
7. Support brightness, contrast, saturation modification
8. Support image non-distortion processing
9. Support image upload in png, jpg, bmp, gif formats
10. Support uploading custom size of avatar (pSize parameter) enterprise version
11. Support custom size of crop box (pCut parameter) enterprise version
12. You can set the cropping area of the image by moving, scaling, rotating, etc.
13. The cropped image area can be previewed in multiple sizes in real time.
14. Cropped pictures can be submitted to the server asynchronously (interface)
14: Supports the number of uploaded pictures (enterprise version)
Avatar upload preview cutting component parameter description:
imgUrl=default.jpgDefault image
uploadUrl=upfile.php receives image interface
uploadSrc=false whether to upload the original image
showCame=true whether to display the camera
pCut=162|162 crop box size
pSize=162|162|48|48|20|20 preview save image size
pData=162|162|48|48|20|20Save image size
For example: imgUrl=./default.jpg&uploadUrl=./upfile.php&uploadSrc=false&showCame=true&pCut=162|162&pSize=162|162|48|48|20|20&pData=162|162|48|48|20|20
Installation and deployment:
1. Upload to apache, iis, tomcat server, access index.html through the domain name, for example: http://localhost/index.html
2. Determine the writable permissions of the directory where the pictures are stored. The directory where the pictures are stored in iis+win is the everyone user, and apache+linux requires writable permissions (777)
3. Debug method to install firebug, F12->Network->All->View interface return value
Avatar upload preview cutting component update log:
v2.1
1 Solve the bug of failure to click "Local Upload Image" in flash13 or above versions
2 Newly added ssh framework (struts+spring+hibernate) integration test code v2.0
1. Add more js callback function parameters picUrl, callbackdata
picUrl: backend image path
callbackdata: backend return data
2. Added new backend image path savePath (default current path)
3. Newly added backend saved picture name savePicName (default is timestamp)
4. Modify the image save name and store it according to the timestamp