1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/aws/requests/s3/put_object.rb
2009-07-13 19:14:59 -07:00

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