miuhr / yii2-qiniu
This package is abandoned and no longer maintained.
The author suggests using the crazyfd/yii2-qiniu package instead.
yii2上传到七牛云存储
0.1
2017-12-21 07:01 UTC
Requires
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2022-02-01 13:11:27 UTC
README
=================================
- @author crazyfd crazyfd@qq.com
只是因为原作者没有发布正式版本,造成了在生产环境使用困难,所以fork一份自己发布成正式版
file upload for Yii Framework 2
php > 5.5
How to install? To use this extension, you may insert the following code:
Get it via composer by adding the package to your composer.json:
composer require miuhr/yii2-qiniu
Usage
<?php $ak = 'sss'; $sk = 'sss'; $domain = 'http://demo.domain.com/'; $bucket = 'demo'; use crazyfd\qiniu\Qiniu; $qiniu = new Qiniu($ak, $sk,$domain, $bucket); $key = time(); $qiniu->uploadFile($_FILES['tmp_name'],$key); $url = $qiniu->getLink($key);