承接 syships/yii2-qiniu 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

syships/yii2-qiniu

最新稳定版本:0.0.5

Composer 安装命令:

composer require syships/yii2-qiniu

包简介

The qiniu SDK for the Yii2 framework

README 文档

README

This is a personal plugin for study. It is strongly recomended that you not use it. This plugin is unstable.

It is the qiniu plugin for yii2

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist syships/yii2-qiniu "*"

or add

"syships/yii2-qiniu": "*"

to the require section of your composer.json file.

Usage

Before using the extension,you can add the _ide_helper.php under your application folder.

Once the extension is installed, simply use it in your code by :

config:

'components' => [
    'qiniu' => [
        'class' => 'syships\qiniu\Application',
        'accessKey' => "QdgHxWgNAhwiKLbzKtUgdNajI6wZopUEXLGN7Ujf",
        'secretKey' => "EKG9b3QW3YsVI0ID-xzDZFbd6I9E-Npey6pnYvI9"
    ],
],

You can use the code below:

use Qiniu\Storage\UploadManager;
use Yii;
use yii\web\UploadedFile;

$image = UploadedFile::getInstanceByName('image');
$fileName = 'image_' . time() .rand(1000,9999). '.' . $image->getExtension();
$upToken = Yii::$app->qiniu->Auth()->uploadToken("syships-imgs");
$uploadMgr = new UploadManager();
list($result, $error) = $uploadMgr->putFile($upToken, $fileName, $image->tempName);

统计信息

  • 总下载量: 6
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2024-07-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固