meisam-mulla / flysystem-stretchfs
There is no license information available for the latest version (v1.4.1) of this package.
A Flysystem adapter for StretchFS.
v1.4.1
2024-04-09 19:19 UTC
Requires
- php: ^8.0
- league/flysystem: ^3.0
- meisam-mulla/sfs-client: ^1.5
README
This package provides a League\Flysystem adapter for StretchFS. It allows you to use the Flysystem API to interact with your StretchFS storage system, leveraging the features and ease of use of Flysystem for file operations within StretchFS.
Installation
You can install the package via composer:
composer require meisam-mulla/flysystem-stretchfs
Configuration
After installation, you can configure the adapter in your Laravel application or in any PHP project that uses Flysystem. Here's how you can do it:
Laravel
In your config/filesystems.php, add a new disk:
'disks' => [ // Other disks... 'stretchfs' => [ 'driver' => 'stretchfs', 'domain' => 'your_sfsserver.net', 'token' => 'your_token', ], ],
Plain PHP
If you're using Flysystem in a non-Laravel PHP project, you can directly instantiate the StretchFsAdapter:
use League\Flysystem\Filesystem; use MeisamMulla\SfsClient\StretchFS; use MeisamMulla\FlysystemStretchfs\StretchFsAdapter; $client = new StretchFS([ 'domain' => 'sfsserver.net', 'token' => 'your_token', ]); $adapter = new StretchFsAdapter($client); $filesystem = new Filesystem($adapter);