https://github.com/sistemi-etime/flysystem-plugin-aws-s3-v3
Plugin Flysystem AWS S3 getPresignedUrl
https://github.com/sistemi-etime/flysystem-plugin-aws-s3-v3
aws aws-s3 flysystem php plugin presignedurl s3
Last synced: about 1 year ago
JSON representation
Plugin Flysystem AWS S3 getPresignedUrl
- Host: GitHub
- URL: https://github.com/sistemi-etime/flysystem-plugin-aws-s3-v3
- Owner: sistemi-etime
- License: mit
- Created: 2018-04-03T08:22:24.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-11-08T09:02:26.000Z (over 6 years ago)
- Last Synced: 2025-03-25T09:47:38.590Z (over 1 year ago)
- Topics: aws, aws-s3, flysystem, php, plugin, presignedurl, s3
- Language: PHP
- Homepage:
- Size: 8.79 KB
- Stars: 11
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Flysystem AWS S3 Plugin
[](https://www.e-time.it)
[](https://www.e-time.it)
[](https://travis-ci.org/sistemi-etime/flysystem-plugin-aws-s3-v3)
[](LICENSE)
[](https://packagist.org/packages/sistemi-etime/flysystem-plugin-aws-s3-v3)
[](https://packagist.org/packages/sistemi-etime/flysystem-plugin-aws-s3-v3)
## Requirements
+ [Flysystem](http://flysystem.thephpleague.com/) >= 1.0.0
## Installation
Using composer:
```
composer require sistemi-etime/flysystem-plugin-aws-s3-v3
```
Or add it manually:
```json
{
"require": {
"sistemi-etime/flysystem-plugin-aws-s3-v3": "1.*"
}
}
```
## Usage
This plugin requires a `Filesystem` instance using the [AwsS3Adapter adapter]).
```php
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');
```