flyok666 / yii2-qiniu
yii2上传到七牛云存储
This package's canonical repository appears to be gone and the package has been frozen as a result. Email us for help if needed.
1.0.2
2017-07-18 14:48 UTC
This package is not auto-updated.
Last update: 2019-05-26 00:56:28 UTC
README
composer.json:
{
"require": {
"flyok666/yii2-qiniu": "~1.0.0"
}
}
Usage
<?php use flyok666\qiniu\Qiniu; $config = [ 'accessKey'=>'xxx', 'secretKey'=>'xxx', 'domain'=>'http://demo.domain.com/', 'bucket'=>'demo', 'area'=>Qiniu::AREA_HUABEI ]; $qiniu = new Qiniu($config); $key = time(); $qiniu->uploadFile($_FILES['tmp_name'],$key); $url = $qiniu->getLink($key);