Closed joonas-fi closed 5 months ago
This boilerplate (for github.com/aws/aws-sdk-go
) works for DigitalOcean Spaces:
config := &aws.Config{
Endpoint: Pointer("fra1.digitaloceanspaces.com"),
Region: Pointer("fra1"),
}
if accessKeyId != "" {
config.WithCredentials(credentials.NewStaticCredentials(accessKeyId, accessKeySecret, ""))
}
sess, err := session.NewSession(config)
if err != nil {
return nil, err
}
return s3.New(sess), nil
Looking at above screenshot, we support already configuring Region ID
so all thats' missing is the endpoint.
Summary: let's support specifying the endpoint. That should unlock DigitalOcean and other 3rd party services.
The above described implementation works:
You get something like from DigitalOcean as bucket endpoint https://mybucket.ams3.digitaloceanspaces.com
. This means you configure to Varasto:
mybucket
ams3
ams3.digitaloceanspaces.com
Current config UI: