1
0
Fork 0
mirror of https://github.com/fog/fog-aws.git synced 2022-11-09 13:50:52 -05:00

Raise an error (on the setter) if chunk size is too small - fixes #283

This commit is contained in:
Brett Cave 2016-07-30 07:33:47 +02:00
parent ca995af100
commit 0f5ff953ba
No known key found for this signature in database
GPG key ID: C03499DC0E9CA275

View file

@ -27,7 +27,11 @@ module Fog
# @note Chunk size to use for multipart uploads.
# Use small chunk sizes to minimize memory. E.g. 5242880 = 5mb
attr_accessor :multipart_chunk_size
attr_reader :multipart_chunk_size
def multipart_chunk_size=(mp_chunk_size)
raise ArgumentError.new("minimum multipart_chunk_size is 5242880") if mp_chunk_size < 5242880
@multipart_chunk_size = mp_chunk_size
end
def acl
requires :directory, :key