mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
21 lines
478 B
Ruby
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
|