innoboxrr / aws-file-manager
Installs: 42
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/innoboxrr/aws-file-manager
Requires
- aws/aws-sdk-php: ^3.316
- league/flysystem-aws-s3-v3: ^3.28
Requires (Dev)
- innoboxrr/larapack-generator: ^4.0
- orchestra/testbench: ^8.0
README
innoboxrr/aws-file-manager
is a Laravel package for managing files in AWS S3.
Installation
You can install the package via Composer:
composer require innoboxrr/aws-file-manager
Configuration
You need to publish the configuration file:
php artisan vendor:publish --provider="Innoboxrr\\AWSFileManager\\AWSFileManagerServiceProvider"
Then, configure your AWS credentials in the .env
file:
AWS_ACCESS_KEY_ID=your-access-key-id
AWS_SECRET_ACCESS_KEY=your-secret-access-key
AWS_DEFAULT_REGION=your-default-region
AWS_BUCKET=your-bucket-name
Usage
Upload a File
use Innoboxrr\AWSFileManager\Facades\AWSFileManager; AWSFileManager::upload($filePath, $destinationPath);
Download a File
use Innoboxrr\AWSFileManager\Facades\AWSFileManager; $fileContent = AWSFileManager::download($filePath);
Delete a File
use Innoboxrr\AWSFileManager\Facades\AWSFileManager; AWSFileManager::delete($filePath);
Testing
composer test
License
The MIT License (MIT). Please see License File for more information.