synapsestudios/synapse-files

This package is abandoned and no longer maintained. No replacement package was suggested.

Filesystem services, controllers, etc

v1.1.0 2015-10-29 23:52 UTC

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