-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update AWS/S3 config #764
Update AWS/S3 config #764
Conversation
Endpoint: b.config.S3Endpoint, | ||
Region: b.config.S3Region, | ||
DisableSSL: b.config.S3DisableSSL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Best I can tell this isn't needed if you're providing an endpoint as a full URL with http or https
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #764 +/- ##
==========================================
+ Coverage 75.87% 75.90% +0.02%
==========================================
Files 111 111
Lines 10392 10386 -6
==========================================
- Hits 7885 7883 -2
+ Misses 1788 1784 -4
Partials 719 719 ☔ View full report in Codecov by Sentry. |
MaxRetries: 3, | ||
} | ||
if b.config.AWSAccessKeyID != "" && !b.config.AWSUseCredChain { | ||
s3config.AWSAccessKeyID = b.config.AWSAccessKeyID | ||
s3config.AWSSecretAccessKey = b.config.AWSSecretAccessKey |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are being set above anyway. The logic should be that if AWSUseCredChain
is set, you get S3 storage if tho AWSAccessKeyID
and AWSSecretAccessKey
are blank.
@@ -655,7 +649,7 @@ func (b *backend) SaveAttachment(ctx context.Context, ch courier.Channel, conten | |||
|
|||
orgID := ch.(*Channel).OrgID() | |||
|
|||
path := filepath.Join(b.config.S3AttachmentsPrefix, strconv.FormatInt(int64(orgID), 10), filename[:4], filename[4:8], filename) | |||
path := filepath.Join("attachments", strconv.FormatInt(int64(orgID), 10), filename[:4], filename[4:8], filename) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not keep that as media
?
Are the files actually moved on that path now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just what is set on the default config (used by tests) that we always overwrite on prod to attachments. RP, mailroom and courier should all use the same attachments
prefix.
69076fd
to
aa4ca63
Compare
No description provided.