Tips for using JS + plupload to directly upload images to youpai cloud _ javascript

Source: Internet
Author: User
This article describes in detail how to bypass the server through js + plupload and batch upload images to youpai cloud, which is very clever and saves server resources, here we recommend you to friends who need it. Forums or post bars often need to share a lot of images. The poor way to upload images is to upload them to the central server, and then the central server forwards them to the static image server. This article describes how to use plupload to optimize the upload process, and how to directly upload images to the cloud in batches without bypassing the server. This article focuses on the following:

The Code is as follows:


Plupload Library
Local Image Compression
Select multiple images
Directly upload images to youpai cloud in batches without bypassing the server
Use youpai HTTP FORM API
Plupload Configuration


Plupload Library

Plupload is a rich Image Upload plug-in. You can use Flash, Silverligh, and html4 to batch upload in earlier browsers. In later browsers, the html5 interface is used to upload files first, and all the judgments are automatic, it can be said that it is very convenient to use! In addition, plupload also supports image compression on the client, direct Drag & Drop for upload, and other functions. For more information, visit its official website.

Here, we only use its core API and only need to introduce a file.

The Code is as follows:


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.