Uploadify enables Qiniu Cloud storage to display the upload progress + page display, and uploadify Niu cloud. Uploadify enables Qiniu Cloud storage to display the upload progress + page display. uploadify: www. uploadify. comdownload Qiniu php-sdk development guide: uploadify enables Qiniu Cloud storage to display the upload progress + page display, uploadify Niu cloud
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