Skip to content

Instantly share code, notes, and snippets.

@timkelty
Created June 22, 2023 02:40
Show Gist options
  • Save timkelty/18a50c38cae3bcb1dc6b85f90d848f94 to your computer and use it in GitHub Desktop.
Save timkelty/18a50c38cae3bcb1dc6b85f90d848f94 to your computer and use it in GitHub Desktop.
<?php
return [
'*' => [],
'dev' => [
'container' => [
'definitions' => [
\craft\awss3\Fs::class => static function($container, $params, $config) {
$bucket = $config['bucket'];
$subfolder = $config['subfolder'];
$path = "assets/$bucket/$subfolder";
return new \craft\fs\Local([
'handle' => $config['handle'],
'hasUrls' => $config['hasUrls'],
'path' => "@webroot/$path",
'url' => "@web/$path",
]);
}
],
]
]
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment