fixes for CHUNK_SIZE constant location and readme. Thanks indirect
This commit is contained in:
parent
2bbb67267a
commit
8cab3723a8
|
@ -41,7 +41,7 @@ fog helps you interact with cloud services. fog is a work in progress.
|
|||
|
||||
# models
|
||||
bucket = s3.buckets.create(:name => 'bucketname')
|
||||
bucket.objects.create(:name => 'objectname', :body => 'objectbody')
|
||||
bucket.objects.create(:key => 'objectname', :body => 'objectbody')
|
||||
|
||||
bucket = s3.buckets.get('bucketname')
|
||||
object = bucket.objects.get('objectname')
|
||||
|
|
|
@ -101,9 +101,9 @@ else
|
|||
data = StringIO.new(object[:body])
|
||||
remaining = data.length
|
||||
while remaining > 0
|
||||
chunk = data.read([remaining, Fog::Connection::CHUNK_SIZE].min)
|
||||
chunk = data.read([remaining, Excon::CHUNK_SIZE].min)
|
||||
block.call(chunk)
|
||||
remaining -= Fog::Connection::CHUNK_SIZE
|
||||
remaining -= Excon::CHUNK_SIZE
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue