Using Plupload to directly upload attachments to qiniu cloud storage _ javascript skills

Source: Internet
Author: User
Tags echo date
This article mainly introduces how to use Plupload to directly upload attachments to qiniu cloud storage. If you need this plug-in, you can refer to this plug-in to which users?

1. users who want to download servers in a small space do not have enough bandwidth or space. How can we solve this problem? Make our website an intermediate layer, and then upload the content to the server to qiniu cloud storage. The download is equivalent to the download of qiniu, which saves both space and bandwidth, solved the possibility that a small space cannot be used as a download site!

2. my server is very good, but sometimes users only upload a few K faster, there is no lack of ISP limit to 64 KB, but not a few K, this actually exists, we also use this as the upload server, and then use the software to regularly download to the server. This is what a website owner currently does.

3. Create a document library for others to upload to my cloud Space

Such

With regard to this plug-in, JS has to say that the Plupload plug-in is really powerful, and there is a problem with its power. It is complicated. What is complicated? It can be customized, you can implement the desired function by yourself. If you only talk about this plug-in, it will be too difficult. You can refer to the official API. Here I am just doing a seven-way demo, you can take a look at uploadify in the front!

Index. php

The Code is as follows:


<? Php
Require_once ("./qiniu/io. php ");
Require_once ("./qiniu/rs. php ");
Require_once ("./qiniu/fop. php ");
$ Bucket = "space name ";
$ AccessKey = 'apikey ';
$ SecretKey = 'apikey ';
Qiniu_SetKeys ($ accessKey, $ secretKey );
$ PutPolicy = new Qiniu_RS_PutPolicy ($ bucket );
$ UpToken = $ putPolicy-> Token (null );
?>




Plupload for QINIU

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.