Closed
Description
When using the Upload
method, on Swift we remove the prefix /
(https://github.com/Scalingo/go-utils/blob/master/storage/swift.go#L120):
func (s *Swift) fullPath(path string) string {
return strings.TrimLeft(s.cfg.Prefix+"/"+path, "/")
}
But we don't do the same with S3. Hence for the same code, when I switch from one driver to another I don't have the same upload behaviour. It's annoying as with s3cmd, here is what I saw:
╰─$ s3cmd ls s3://auditlogs-development
DIR s3://auditlogs-development//
Then I need to write the following to see my upload:
╰─$ s3cmd ls s3://auditlogs-development//
DIR s3://auditlogs-development//2019-08-26/
It confused me...
@Soulou Don't you think we should have the same behaviour for both? Do you prefer to remove this behaviour from Swift or add it to S3?