jcberquist / aws-cfml

Lucee/ColdFusion library for interacting with AWS API's
MIT License
72 stars 53 forks source link

Add support for alternate S3 services #24

Closed zspitzer closed 5 years ago

zspitzer commented 5 years ago

allow overriding the hardwired support amazon s3 hostnames

so that local or other s3 servers like mimio (https://min.io/ ) etc can be used for local testing etc

mimio = new aws(
    awsKey = '***',
    awsSecretKey = '***',
    defaultRegion = 'us-east-1',
    constructorArgs = {
        s3_other: {
            host = 'localhost:9000',
            useSSL = false
        }
    }
);
jcberquist commented 5 years ago

In looking at this, I think I would rather add your changes directly to the S3 service. (Unless you have some reason it would be a bad idea?) The only tricky bit would be the host setting, but maybe we could set the default to amazonaws.com and, if that is the host name, have getHost(region) return the computed host as is done currently, but if it is not just return the host name as is?

zspitzer commented 5 years ago

yeah, I'm happy to do that. Wasn't sure when I started looking at it how much i'd need to change, hence the other component to keep it simple

zspitzer commented 5 years ago

I merged the changes into s3.cfc

jcberquist commented 5 years ago

Thank you!