Home > Web Front-end > JS Tutorial > Use Plupload to directly upload attachments to Qiniu Cloud Storage_javascript skills

Use Plupload to directly upload attachments to Qiniu Cloud Storage_javascript skills

WBOY
Release: 2016-05-16 16:24:22
Original
1614 people have browsed it

Who is this plug-in mainly targeted at?

1. Space Xiao wants to be a user of the download server, but there is neither enough bandwidth nor enough space. How can we do this? Our website is made into the middle layer, and then when the user uploads it to the server, it is actually uploaded to Qiniu Cloud Storage. The download is also equivalent to downloading in Qiniu, which saves space and bandwidth, and solves the problem that a small space cannot be used as a download site. possible!

2. My own server is very good, but sometimes the upload speed of users can only go up to a few KB. This is sometimes limited by ISP to 64KB, but it cannot reach only a few KB. This is real, and we also use it. This is used to upload to the server, and then use software to download to the server regularly. This is what a website owner is doing now

3. Make a personal document library and let others upload it to my cloud space

Just like the example below

Regarding this plug-in, I have to say that the Plupload plug-in in JS is really powerful. There is a problem with being powerful. It is complicated. What is complicated is that it can be customized. You can have enough food and clothing by yourself. You can realize the functions you want by yourself. If It would be too laborious to just talk about this plug-in. You can refer to the official API. I am just making a Qiniu demo here. Anyone who has uploadify in front can take a look!

index.php

Copy code The code is as follows:

<?php
require_once("./qiniu/io.php");
require_once("./qiniu/rs.php");
require_once("./qiniu/fop.php");
$bucket = "空间名称";
$accessKey = 'APIKEY';
$secretKey = 'APIKEY';
Qiniu_SetKeys($accessKey, $secretKey);
$putPolicy = new Qiniu_RS_PutPolicy($bucket);
$upToken = $putPolicy->Token(null);
?>

http://www.w3.org/1999/xhtml" dir="ltr">


Plupload for QINIU









Plupload to QINIU Example



   

Your browser doesn't have Flash, Silverlight or HTML5 support.








Qiniu’s products are really good. You can learn from my previous articles. There are server backups (LINUX) and the uploadify plug-in. Relatively speaking, this JS plug-in is simple. Of course, Qiniu also has Qiniu in it. Query code, if you have any questions, just ask me
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template