A Flarum extension. Relocate Flarum disks onto S3 or compatible bucket
Install with composer:
composer require fof/s3-assets:"*"
composer update fof/s3-assets
php flarum cache:clear
The S3 (or compatible) bucket can be configured either by environment variables or via the extension settings. If the environment variables are set, they will override the settings entered in the admin panel, if set.
FOF_S3_ACCESS_KEY_ID
- your access key ID *FOF_S3_SECRET_ACCESS_KEY
- your secret *FOF_S3_DEFAULT_REGION
- the region *FOF_S3_BUCKET
- the bucket name *FOF_S3_URL
- the public facing base URL of the bucketFOF_S3_ENDPOINT
- the ARNFOF_S3_ACL
- The ACL, if any, that should be applied to the uploaded object. For possible values, see AWS DocsFOF_S3_PATH_STYLE_ENDPOINT
- boolean value
*
denotes the minimum requirements for using S3 on AWS. S3-compatible services will require more.
If you plan to setup the S3 configuration using the environment variables, please ensure these are set before enabling the extension
After your new bucket is configured, any exisiting files, will not exist there (ie uploaded avatars, profile covers, etc).
Use the provided command to start moving these files:
php flarum fof:s3:move