From 0ea937385b48ddabbf7fc347941114eacd5dc39e Mon Sep 17 00:00:00 2001 From: Francis Bouvier Date: Sun, 5 Apr 2020 02:21:42 +0200 Subject: [PATCH] Fix Exists method Call Filename method on key, otherwise the storage path is not included. Signed-off-by: Francis Bouvier --- s3storage.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s3storage.go b/s3storage.go index c059a81..30f9533 100644 --- a/s3storage.go +++ b/s3storage.go @@ -65,7 +65,7 @@ func NewS3Storage(bucketName, aws_region string) *S3Storage { func (s *S3Storage) Exists(key string) bool { _, err := s.svc.GetObject(&s3.GetObjectInput{ Bucket: s.bucket, - Key: aws.String(key), + Key: aws.String(s.Filename(key)), }) if err == nil { return true