2017 © Pedro Peláez
 

library ossfs

aliyun oss adapter for laravel file system 5.2+

image

jacksunny/ossfs

aliyun oss adapter for laravel file system 5.2+

  • Tuesday, July 4, 2017
  • by jacksunny2020
  • Repository
  • 1 Watchers
  • 0 Stars
  • 13 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

ossfs

laravel file system plugin based-on aliyun oss,you may use oss as normal laravel file system mode, (*1)

  1. install package composer require "jacksunny/ossfs":"dev-master", (*2)

  2. append the code below to array "disks" in the file config/filesystems.php, (*3)

  'oss' => [
            'driver' => 'oss',
            //using innernal network to transfer files,suggest external network for testing,internal network for running
            //'internal'=>true,
            'internal'=>false,
            'key' => env('OSS_KEY','APPKEYAPPKEYAPPK'),
            'secret' => env('OSS_SECRET','APPSECRETAPPSECRETAPPSECRETAPP'),            
            'city'=>'上海',
            'networkType'=>'经典网络',
            'bucket' => env('OSS_BUCKET','mybucketname'),
        ],
   
  1. now you may use laravel file system to put/get files on aliyun oss
   $filename = time()."";
   $content = "Contents";
   $result =  Storage::disk('oss')->put($filename, $content);
   or
   $result = Storage::disk('oss')->put($filename, $request->file('logo')->getRealPath());
   

The Versions

04/07 2017

dev-master

9999999-dev

aliyun oss adapter for laravel file system 5.2+

  Sources   Download

The Requires

 

by jacksunny

09/06 2017

v0.7

0.7.0.0

aliyun oss adapter for laravel file system 5.2+

  Sources   Download

The Requires

 

by jacksunny