nyaruka / gocommon

Common utility library for the TextIt platform.
Other
7 stars 11 forks source link

Bug when using S3 compatible (not amazon) services #36

Open awensaunders opened 4 years ago

awensaunders commented 4 years ago

I use Minio in my local development environment to support developing on attachments. It doesn't work properly right now, because all the URLs that courier passes to rapidpro are wrong, pointing to Amazon S3 rather than my local minio environment.

https://github.com/nyaruka/gocommon/blob/e8b962c465f1e2b0dbf142e4b9a3096f56e069e9/storage/s3.go#L15 is hardcoded to amazon's URL. If it pulled from the config instead, it would be portable to various S3 compatible services.

I could make a PR if you want.

rowanseymour commented 4 years ago

Sure, so passed in via S3Options but defaults to that existing AWS URL?

awensaunders commented 4 years ago

That would be the behaviour I’d expect.