jacksunny / ossfs
aliyun oss adapter for laravel file system 5.2+
Installs: 19
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/jacksunny/ossfs
Requires
- johnlui/aliyun-oss: ^2.2
- laravel/framework: 5.4.*
This package is not auto-updated.
Last update: 2025-10-23 12:46:54 UTC
README
laravel file system plugin based-on aliyun oss,you may use oss as normal laravel file system mode
-
install package composer require "jacksunny/ossfs":"dev-master"
-
append the code below to array "disks" in the file config/filesystems.php
'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'),
],
- 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());