Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/vos/drivers/s3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class S3
def initialize options = {}
options = options.clone
@bucket_name = options.delete(:bucket) || raise("S3 bucket not provided!")
@acl = options.delete(:acl) || :public_read
@write_options = {:acl => :public_read}.merge(options.delete(:write_options))
@options = options
end

Expand Down Expand Up @@ -57,7 +57,7 @@ def _clear
end

protected
attr_reader :options, :bucket_name, :acl
attr_reader :options, :bucket_name, :write_options
end
end
end
end
6 changes: 3 additions & 3 deletions lib/vos/drivers/s3_vfs_storage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ def write_file original_path, append, &block
writer = Writer.new
writer.write file.read if file.exists?
block.call writer
file.write writer.data, acl: acl
file.write writer.data, write_options
else
writer = Writer.new
block.call writer
file.write writer.data, acl: acl
file.write writer.data, write_options
end
end

Expand Down Expand Up @@ -144,4 +144,4 @@ def normalize_path path
end
end
end
end
end