mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
20 lines
451 B
Ruby
20 lines
451 B
Ruby
module Fog
|
|
module AWS
|
|
class S3
|
|
|
|
# Create an object in an S3 bucket
|
|
# FIXME: docs
|
|
def put_object(bucket_name, object_name, object, options = {})
|
|
file = parse_file(object)
|
|
request({
|
|
:body => file[:body],
|
|
:headers => options.merge!(file[:headers]),
|
|
:host => "#{bucket_name}.#{@host}",
|
|
:method => 'PUT',
|
|
:path => object_name
|
|
})
|
|
end
|
|
|
|
end
|
|
end
|
|
end
|