Based on Qiniu Plupload developed front-end API and JavaScript SDK
Outline
The SDK is suitable for IE8 +, Chrome, Firefox, Safari and other browsers, built on seven official cattle cloud storage API, which uploads based Plupload plugin package. Developers using the SDK can easily upload files from the browser end to seven cattle cloud storage, and after successful upload of image-rich data processing operations. The SDK enables developers to ignore the underlying implementation details to upload, and show more concern UI layer.
Features
Upload
- html5 mode can be divided into more than 4M block when uploading, less than 4M Direct
- Flash, html4 Mode Direct Upload
- Inherited Plupload feature that can filter files to upload, drag uploading
Download (Open Source)
Data processing (Picture)
- imageView2 (thumbnails)
- imageMogr2 (advanced treatment, including scaling, cropping, rotating, etc.)
- imageInfo (access to basic information)
- exif (Get image EXIF information)
- watermark (text, image watermark)
- pipeline (pipes, can imageView2, imageMogr2, watermark be chaining)
- SDK constitute Introduction
Plupload, 2.1.1 and above is recommended
- qiniu.js, SDK main file upload function \ data processing implementation
- Install and run the program
Server ready
The SDK rely on servers issuing upToken, through the following two ways:
Qiniu side SDK to build back-end services
The use of seven cattle underlying API to build a service, as detailed in seven cattle Upload strategy and upload credentials
Back-end services should provide a URL address for the SDK is initialized with the front end by obtaining upToken Ajax request after the address. After Ajax request succeeds, the server should return json following format:
{
"Uptoken": "0MLvWPnyya1WtPnXFy9KLyGHyFPNdZceomL ..."
}
Introducing Plupload
Plupload download, recommend 2.1.1 or later
Get the source code from the download tab.