2017 © Pedro Peláez
 

library flysystem-aliyun-oss

This is a Flysystem adapter for the Aliyun OSS ~2.2.1

image

hobbily/flysystem-aliyun-oss

This is a Flysystem adapter for the Aliyun OSS ~2.2.1

  • Tuesday, September 26, 2017
  • by hobbily
  • Repository
  • 1 Watchers
  • 0 Stars
  • 13 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 17 Forks
  • 0 Open issues
  • 13 Versions
  • 0 % Grown

The README.md

Flysystem Adapter for Aliyun OSS.

This is a Flysystem adapter for the Aliyun OSS ~2.2.1, (*1)

inspire by aobozhang/aliyun-oss-adapter, (*2)

inspire by apollopy/flysystem-aliyun-oss, (*3)

Installation

composer require gradii/flysystem-aliyun-oss

for Laravel

This service provider must be registered., (*4)

In order to be compatible to prev xsilen/flysystem-aliyun-oss, i have not change namespace start with Gradii, (*5)

// config/app.php

'providers' => [
    '...',
    Xsilen\Flysystem\AliyunOss\AliyunOssServiceProvider::class,
];

edit the config file: config/filesystems.php, (*6)

add config, (*7)

'oss' => [
    'driver'     => 'oss',
    'access_id'  => env('ALIYUN_OSS_ACCESS_KEY_ID'),
    'access_key' => env('ALIYUN_OSS_ACCESS_KEY_SECRET'),
    'bucket'     => env('ALIYUN_OSS_BUCKET_NAME'),
    //使用endpoint来上传oss文件, 如果是OSS内网上传, 刚将OSS内网地址填在此处
    'endpoint'   => env('ALIYUN_OSS_ENDPOINT'),
    'cdnDomain'  => env('ALIYUN_OSS_CDN_DOMAIN'),
    // true to use 'https://' and false to use 'http://'. default is false,
    'ssl'        => true,
    // 如果isCName为true, getUrl会判断cdnDomain是否设定来决定返回的url,如果cdnDomain未设置,则使用endpoint来生成url,否则使用cdn
    // 而且, 上传将会用endpoint来上传, 读取将会用cdnDomain来读取
    'isCName'    => true,
    'prefix'     => env('OSS_PREFIX', ''), // optional
],

change default to oss, (*8)

    'default' => 'oss'

Use

see Laravel wiki, (*9)

Plugins

inspire by itbdw/laravel-storage-qiniu, (*10)

Storage::disk('oss')->putFile($path, '/local_file_path/1.png', ['mimetype' => 'image/png']);
Storage::disk('oss')->signedDownloadUrl($path, 3600, /*可强制写cdnDomain*/'oss-cn-beijing.aliyuncs.com', true);
Storage::disk('oss')->fullUrl($path, /*可强制写cdnDomain*/'oss-cn-beijing.aliyuncs.com', true);

IDE Helper

if installed barryvdh/laravel-ide-helper, (*11)

edit the config file: config/ide-helper.php, (*12)

'interfaces'      => [
    '\Illuminate\Contracts\Filesystem\Filesystem' => Xsilen\Flysystem\AliyunOss\FilesystemAdapter::class,
],

The Versions

26/09 2017

3.0.1

3.0.1.0

This is a Flysystem adapter for the Aliyun OSS ~2.2.1

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar xsilen

26/09 2017

dev-master

9999999-dev

This is a Flysystem adapter for the Aliyun OSS ~2.2.1

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar xsilen

19/07 2017

dev-develop

dev-develop

This is a Flysystem adapter for the Aliyun OSS ~2.2.1

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar xsilen

19/07 2017

2.0.1.x-dev

2.0.1.9999999-dev

This is a Flysystem adapter for the Aliyun OSS ~2.2.1

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar xsilen

19/07 2017

2.0.1

2.0.1.0

This is a Flysystem adapter for the Aliyun OSS ~2.2.1

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar xsilen

19/07 2017

2.0.0

2.0.0.0

This is a Flysystem adapter for the Aliyun OSS ~2.2.1

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar xsilen

28/06 2017

1.3

1.3.0.0

This is a Flysystem adapter for the Aliyun OSS ~2.2.1

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar xsilen

10/01 2017

1.2.0

1.2.0.0

This is a Flysystem adapter for the Aliyun OSS ~2.0.4

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar apollopy

02/02 2016

1.1.3

1.1.3.0

This is a Flysystem adapter for the Aliyun OSS ~2.0.4

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar apollopy

28/01 2016

1.1.2

1.1.2.0

This is a Flysystem adapter for the Aliyun OSS ~2.0.4

  Sources   Download

The Requires

 

The Development Requires

by Avatar apollopy

28/01 2016

1.1.1

1.1.1.0

This is a Flysystem adapter for the Aliyun OSS ~2.0.4

  Sources   Download

The Requires

 

The Development Requires

by Avatar apollopy

21/01 2016

1.1.0

1.1.0.0

This is a Flysystem adapter for the Aliyun OSS ~2.0.4

  Sources   Download

The Requires

 

The Development Requires

by Avatar apollopy

20/01 2016

1.0.0

1.0.0.0

This is a Flysystem adapter for the Aliyun OSS ~2.0.4

  Sources   Download

The Requires

 

The Development Requires

by Avatar apollopy