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));
}