[bugfix] s3 media uploaded without content-type (#3353)

* update go-storage dependency, for S3Storage manually call PutObject() so we can set content-type

* update calls to PutFile() to include the contentType
This commit is contained in:
kim
2024-09-26 12:43:10 +00:00
committed by GitHub
parent b0fbc327f0
commit 53ee6aef08
15 changed files with 433 additions and 210 deletions

View File

@ -129,9 +129,10 @@ func isHTTPStatusRetryable(httpStatusCode int) (ok bool) {
}
// For now, all http Do() requests are retriable except some well defined errors
func isRequestErrorRetryable(err error) bool {
func isRequestErrorRetryable(ctx context.Context, err error) bool {
if errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) {
return false
// Retry if internal timeout in the HTTP call.
return ctx.Err() == nil
}
if ue, ok := err.(*url.Error); ok {
e := ue.Unwrap()