miuhr / yii2-qiniu
yii2上传到七牛云存储
Installs: 106
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 19
Type:yii2-extension
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);