Download the PHP package xzhiyu/thinkphp-qiniu-sdk without Composer

On this page you can find all versions of the php package xzhiyu/thinkphp-qiniu-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package thinkphp-qiniu-sdk

thinkphp-qiniu-sdk

基于tp5.1框架的七牛云存储实现,实现文件上传,文件管理功能

基于 https://github.com/teg1c/thinkphp-qiniu-sdk 进行修改,如有侵权请联系 [email protected]

composer 安装

如果该方法安装不成功,请在项目根目录下的composer.json的require中添加

然后使用cmd进入项目根目录下运行composer update

配置使用

配置:

在tp5.1的配置文件app.php中配置七牛云的配置参数

使用

上传成功则返回的是key值为文件名

直接使用

文件流上传(这个属于新增)

使用的场景:微信小程序等生成的场景用于直接上传到cdn的情况,其余自测

上传成功返回数据实例:

上传失败(已存在的情况下):

上传数据的mimeType 暂时写死为 'image/png' 后序改为自行传入

说明:

  • 修改了七牛参数配置请清除一下缓存
  • upload()方法支持参数传入。可传入第一个参数为要上传文件保存的名称,第二个参数为bucket名称。

第一个参数默认取文件的hash串拼接时间戳time()

第二个参数默认为配置里的bucket

如果使用中有任何错误或者疑问可以给我发邮件:[email protected]


All versions of thinkphp-qiniu-sdk with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package xzhiyu/thinkphp-qiniu-sdk contains the following files

Loading the files please wait ....