Uploadify: Display Upload progress + page display preparation: uploadify: www. uploadify. comdownload seven cattle php-sdk development guide: developer.qiniu.comdocsv6sdkphp-sdk.html php-sdk address: github. comqini uploadify enables Qiniu Cloud storage to display the upload progress + page display
Preparation:
Uploadify:
Http://www.uploadify.com/download/
Qiniu php-sdk development guide:
Http://developer.qiniu.com/docs/v6/sdk/php-sdk.html
Php-sdk address:
Https://github.com/qiniu/php-sdk
Start:
DEMO:
Http://hxend.com/uploadif/
Register an account in Qiniu and become a standard user
Free storage space 10 GB
Free monthly download traffic of 10 GB
0.1 million PUT/DELETE requests per month for free
GET 1 million requests per month for free
It seems to be a good benefit.
After successful registration, the account page will contain ak and sk keys that can be used in the code.
Download uploadify and put the content in the Qiniu php-sdk package in uploadify.
The code for opening the uploadify. php file is as follows:
Modify the code as follows.
Token (null); $ putExtra = new Qiniu_PutExtra (); $ putExtra-> Crc32 = 1; // $ tempFile uploadify) = Qiniu_PutFile ($ upToken, $ key1, $ tempFile, $ putExtra); // upload an image to the cloud end // return the file name to the front-end echo "http://hdimg.qiniudn.com /". $ key1; // data parameter reception using the callback function} else {echo 'invalid file type. ';}}
The front-end index. php is changed to: the front-end calls the echo output value data for operations.
UploadiFive Test