sistemi-etime / flysystem-plugin-aws-s3-v3
AWS S3 plugin for Flysystem.
Installs: 141 556
Dependents: 2
Suggesters: 0
Security: 0
Stars: 11
Watchers: 2
Forks: 3
Open Issues: 0
Requires
- league/flysystem: ~1.0
- league/flysystem-aws-s3-v3: ~1.0
This package is not auto-updated.
Last update: 2024-11-18 09:01:43 UTC
README
Requirements
- Flysystem >= 1.0.0
Installation
Using composer:
composer require sistemi-etime/flysystem-plugin-aws-s3-v3
Or add it manually:
{ "require": { "sistemi-etime/flysystem-plugin-aws-s3-v3": "1.*" } }
Usage
This plugin requires a Filesystem
instance using the [AwsS3Adapter adapter]).
use Etime\Flysystem\Plugin\AWS_S3 as AWS_S3_Plugin; use League\Flysystem\AwsS3v3\AwsS3Adapter; use League\Flysystem\Filesystem; use Aws\S3\S3Client; $client = new S3Client([ 'credentials' => [ 'key' => 'your-key', 'secret' => 'your-secret' ], 'region' => 'your-region', 'version' => 'latest|version', ]); $adapter = new AwsS3Adapter($client, 'your-bucket-name'); $filesystem = new Filesystem($adapter); $filesystem->addPlugin(new AWS_S3_Plugin\PresignedUrl()); $success = $filesystem->getPresignedUrl('/tmp/some/target');