Closed sminnee closed 7 years ago
Ah yep, so you'd like the ability to specify an optional additional prefix (e.g. public/
becomes site-name/public
?
The AwsS3Adapter
already has the concept of a 'path prefix' which I use to distinguish public
vs. protected
files, so that would be easy to accommodate.
Makes sense to specify these things by YML rather than direct env vars if possible, I'll look into that sometime :)
This works like this:
AWS_PROTECTED_BUCKET_PREFIX="sminnee/protected"
AWS_PUBLIC_BUCKET_PREFIX="sminnee/public"
Assets might not be stored in a bucket root; they may be in an arbitrary subfolder of a bucket.
More generally, it would be useful if an appropriate AWS service object could be scaffolded by Injector and then passed into your filesystem adaptors, rather than needing new env vars for every bit of config that may be necessary.
Ideally, the env vars could be loaded into a yaml config and used to build that service. Direct access to env vars works for come config (specifically configuration related to Injector parameters) but we're looking at rolling it out more widely in alpha7 or beta1.