Closed Genbox closed 3 weeks ago
UseTls is only respected when using EndpointTemplate. GenericS3Config ctors require setting an endpoint (not a template) which overrides the use of EndpointTemplate.
Both Endpoint and EndpointTemplate are strings, which means I can't just create an overload for the ctor in GenericS3Config. I could do it like this:
public GenericS3Config(string keyId, string secretKey, string endpointOrTemplate, bool useEndpointTemplate, string regionCode)
But it is a bit ugly.
I think it would be better to just have Endpoint and then automatically detect if it is a template (contains variables such as {Scheme}
).
I've removed EndpointTemplate
and now use Endpoint
for templates.
There are three template variables:
The variables can be inserted into EndpointTemplate (now Endpoint) like this:
{Scheme}://{Bucket:.}s3.{Region:.}amazonaws.com
The :.
part means that when the variable has a value, it also appends a .
. It can be anything after the colon.
Templates are needed to make UseTls, RegionCode and BucketName on requests work.
Issue described here: https://github.com/Genbox/SimpleS3/issues/59#issuecomment-2305613103