Ueditor+php Configure seven cows upload pictures tutorial

Source: Internet
Author: User

Ueditor as Baidu's visual editor, by the vast number of users sought after! and seven Neu Yun storage is dedicated to provide users with attachment storage, fast upload, attachment security of a cloud products, many companies do not intend to use mirrored storage method to synchronize data, but want to through the visual editor, upload pictures, accessories, etc. to seven cattle cloud storage, because a site is mainly attached and pictures occupy more resources, The loss of bandwidth is more serious! Ueditor and seven cattle cloud storage combination realized-pictures and accessories directly uploaded to seven cows, picture online management functions ~ ~

It share ueditor seven cows

1, login to the official download source code

http://ueditor.baidu.com/website/

2, in the PHP directory to add the following files

conf.php: Configuration file.

Configure $qiniu_access_key and $qiniu_secret_key for your own KEY, configure bucket for your bucket etc

gettoken.php: Get token

qiniu_list.php: File list

qiniu_upload.php: Upload class.

or download Demo package directly: https://github.com/widuu/qiniu_ueditor_1.4.3

3, conf.php


<?php

Global $QINIU _access_key;
Global $QINIU _secret_key;
$QINIU _up_host = ' http://up.qiniu.com ';
$QINIU _rs_host = ' http://rs.qbox.me ';
$QINIU _rsf_host = ' http://rsf.qbox.me ';
Configure $qiniu_access_key and $qiniu_secret_key for your own KEY
$QINIU _access_key = '-rqmthryzyg-lnkmh ';
$QINIU _secret_key = ';
Configure bucket for your bucket
$BUCKET = "Yaoqianbao";
Configure your domain access address
$HOST = "http://s.com2.z0.glb.qiniucdn.com";
Upload Timeout time
$TIMEOUT = "3600";
Save Rule
$SAVETYPE = "date";
Open watermark
$USEWATER = false;
$WATERIMAGEURL = "Http://gitwiduu.u.qiniudn.com/ueditor-bg.png"; The picture address of the seven cows
Watermark Transparency
$DISSOLVE = 50;
Watermark Location
$GRAVITY = "Southeast";
Margin horizontal position
$DX = 10;
Margin Portrait position
$DY = 10;
function Urlsafe_base64_encode ($data) {
$find = Array (' + ', '/');
$replace = Array ('-', ' _ ');
Return Str_replace ($find, $replace, Base64_encode ($data));
}

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.