FIX: S3Helper#list creates incorrect prefix.

This commit is contained in:
Guo Xiang Tan
2018-09-10 16:34:40 +08:00
parent 68572b8afc
commit df04e69cde
2 changed files with 19 additions and 1 deletions
+5 -1
View File
@@ -136,7 +136,11 @@ class S3Helper
end
def list(prefix = "")
s3_bucket.objects(prefix: "#{@s3_bucket_folder_path}/#{prefix}")
if @s3_bucket_folder_path.present?
prefix = File.join(@s3_bucket_folder_path, prefix)
end
s3_bucket.objects(prefix: prefix)
end
def tag_file(key, tags)