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-14 16:04:39 -07:00

21 lines
478 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],
:expects => 200,
:headers => options.merge!(file[:headers]),
:host => "#{bucket_name}.#{@host}",
:method => 'PUT',
:path => object_name
})
end
end
end
end