2017 © Pedro Peláez
 

library flysystem-upyun

Flysystem and Laravel adapter for the Upyun storage.

image

jellybool/flysystem-upyun

Flysystem and Laravel adapter for the Upyun storage.

  • Thursday, August 24, 2017
  • by JellyBool
  • Repository
  • 3 Watchers
  • 59 Stars
  • 5,830 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 11 Forks
  • 3 Open issues
  • 6 Versions
  • 14 % Grown

The README.md

Laravel Flysystem Upyun (又拍云)

:floppy_disk: 又拍云 Flysystem 实现,可直接用于 Laravel 项目。, (*1)

Build Status Quality Score Latest Stable Version Latest Unstable Version Total Downloads License , (*2)

Requirement

  • PHP >= 5.5.9

视频教程

视频使用教程(当然是免费的):https://www.codecasts.com/series/awesome-laravel-packages/episodes/8, (*3)

安装

直接可以通过 composer 来安装:, (*4)


$ composer require "jellybool/flysystem-upyun"

使用

1.在一般项目中使用


use League\Flysystem\Filesystem; use JellyBool\Flysystem\Upyun\UpyunAdapter; $bucket = 'your-bucket-name'; $operator = 'oparator-name'; $password = 'operator-password'; $domain = 'xxxxx.b0.upaiyun.com'; // 或者 https://xxxx.b0.upaiyun.com $adapter = new UpyunAdapter($bucket, $operator, $password, $domain); $flysystem = new Filesystem($adapter);

2.在 Laravel 中使用

1.在 config/app.php 添加 UpyunServiceProvider:, (*5)


'providers' => [ // Other service providers... JellyBool\Flysystem\Upyun\UpyunServiceProvider::class, ],

2.在 config/filesystems.phpdisks 中添加下面的配置:, (*6)


return [ //... 'upyun' => [ 'driver' => 'upyun', 'bucket' => 'your-bucket-name',// 服务名字 'operator' => 'oparator-name', // 操作员的名字 'password' => 'operator-password', // 操作员的密码 'domain' => 'xxxxx.b0.upaiyun.com', // 服务分配的域名 'protocol' => 'https', // 服务使用的协议,如需使用 http,在此配置 http ], //... ];

API 和方法调用


bool $flysystem->write('file.md', 'contents'); bool $flysystem->writeStream('file.md', fopen('path/to/your/local/file.jpg', 'r')); bool $flysystem->update('file.md', 'new contents'); bool $flysystem->updateStram('file.md', fopen('path/to/your/local/file.jpg', 'r')); bool $flysystem->rename('foo.md', 'bar.md'); bool $flysystem->copy('foo.md', 'foo2.md'); bool $flysystem->delete('file.md'); bool $flysystem->has('file.md'); string|false $flysystem->read('file.md'); array $flysystem->listContents(); array $flysystem->getMetadata('file.md'); int $flysystem->getSize('file.md'); string $flysystem->getUrl('file.md'); string $flysystem->getMimetype('file.md'); int $flysystem->getTimestamp('file.md');

License

MIT, (*7)

The Versions

24/08 2017

dev-master

9999999-dev

Flysystem and Laravel adapter for the Upyun storage.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JellyBool

laravel upyun 又拍 又拍云

24/08 2017

1.0.5

1.0.5.0

Flysystem and Laravel adapter for the Upyun storage.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JellyBool

laravel upyun 又拍 又拍云

17/06 2017

1.0.4

1.0.4.0

Flysystem and Laravel adapter for the Upyun storage.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JellyBool

laravel upyun 又拍 又拍云

12/05 2017

1.0.3

1.0.3.0

Flysystem and Laravel adapter for the Upyun storage.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JellyBool

laravel upyun 又拍 又拍云

05/05 2017

1.0.2

1.0.2.0

Flysystem and Laravel adapter for the Upyun storage.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JellyBool

laravel upyun 又拍 又拍云

04/05 2017

1.0.1

1.0.1.0

Flysystem and Laravel adapter for the Upyun storage.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar JellyBool

laravel upyun 又拍 又拍云