Plugin changes the default API endpoint of Craft's S3-AssetSource.
This plugin requires Craft CMS 2. There is another NEWER plugin to provide this for the Craft 3 over here.
- Copy the
fortrabbitobjectstorage/
folder to yourcraft/plugins/
folder. - Go to Settings > Plugins from your Craft control panel and install the "Support for fortrabbit Object Storage" plugin.
- Go to Settings > Assets and click the "New asset source" button.
- Select a Amazon S3
- Enter your Access Key ID (KEY) and Secret Access Key (SECRET)
- Hit Refesh to get the bucket
- Save
Use this SSH command to get the Object Storage credentials for your App:
Schema: ssh git@deploy.{region}.frbit.com secrets {your-app} object_storage
EU: ssh [email protected] secrets {your-app} object_storage
US: ssh [email protected] secrets {your-app} object_storage
Per default the plugin uses the API endpoint of fortrabbit's EU region. If your App runs in the US region, copy fortrabbitobjectstorage/config.php
to craft/config/fortrabbitobjectstorage.php
and change the endpoint.
Unfortunately with resource requests no plugin get's loaded. This means the modified S3 client we provide is not used in any case. Here is a way to fix it:
Include our modified S3 client very early, e.g. at the top in your config/general.php
, like so require_once('../craft/plugins/fortrabbitobjectstorage/S3.php');