synapsestudios / synapse-files
Filesystem services, controllers, etc
Installs: 2 971
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 25
Forks: 0
Open Issues: 1
Requires
- aws/aws-sdk-php: ~2.7
- aws/aws-sdk-php-silex: 1.*
- rhumsaa/uuid: ~2.8
- synapsestudios/synapse-base: >2
Requires (Dev)
- phpunit/phpunit: ~4.5
- squizlabs/php_codesniffer: ~2
This package is not auto-updated.
Last update: 2020-03-20 16:40:29 UTC
README
Installation: Add to composer.json and composer update!
Setup
To use: register the following services in your application:
$app->register(new AwsServiceProvider());
$app->register(new AwsCredentialsServiceProvider());
$app->register(new FileServiceProvider());
Create a file.php config file with the following contents:
return [
'filesystem' => 'local',
'base_path' => realpath(__DIR__.'/..').'/files',
];
For production, file config should be:
<?php
return [
'filesystem' => 's3',
'bucket' => 'some-existing-bucket',
'base_path' => 'files',
];
The following environment variables MUST exist when using S3
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_REGION