oss
oss copied to clipboard
S3 - GetURL returns path if Endpoint set
This seems like unexpected behavior but I wanted to make sure.
It appears as though if the Endpoint
is set or the ACL is set to a BucketCannedACLPrivate
or s3.BucketCannedACLAuthenticatedRead
the interface will return the path that was passed in.
Storage.GetURL(obj.Src) // returns obj.Src
Expected behavior:
If Endpoint
is set it would return {Endpoint}{path}
or if there is no endpoint and public ACL it would return the standard URL for the S3 bucket Region.
I'd be happy to make a pull request for this functionality, but I would like to make sure this is the expected behavior.