Skip to content

Set bucket name in Hook #184

@Suranex

Description

@Suranex

Hey,

we need an environment-dependent S3 configuration. With the help of the initialiseClient-preProcessing hook, we can already set all configurations except for the bucket name. This is read from the FAL configuration ($this->configuration['bucket'] at many places). It would therefore be desirable to have a hook to change the FAL configuration or simply the bucket name overwritable. Can you add a hook for this?

class AmazonS3DriverHook {
    public function initializeClient(array &$params, $obj) {
        $params['configuration']['bucket'] = 'some-name';  ## doesn't work
        $params['configuration']['region'] = 'someregion';  ## works
        $params['configuration']['key'] = 'somekey';  ## works
        $params['configuration']['secretKey'] = 'somesecret';  ## works
        $params['configuration']['customHost'] = 'https://yout-endpoint';  ## works
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions