lib/net/amazon/s3/bucket.rb
# Creates and returns a new S3::Object with the specified +object_key+ and
# +value+. If this bucket already contains an object with the specified key,
# that object will be overwritten.
# 
# If +value+ is an open IO stream, the value of the object will be read from
# the stream.
Creates and returns a new S3::Object with the specified +object_key+ and
+value+. If this bucket already contains an object with the specified key,
that object will be overwritten.

If +value+ is an open IO stream, the value of the object will be read from
the stream.
Creates and returns a new S3 :: Object with the specified + object_key + and + value + . If this bucket already contains an object with the specified key that object will be overwritten . If + value + is an open IO stream the value of the object will be read from the stream .
def create_object(object_key, value, metadata = {})
      object_key_escaped = S3::Object.escape_key(object_key)
      headers = {}
      metadata.each {|key, value| headers["x-amz-meta-#{key}"] = value }
      response = @s3.request_put("/#{@name}/#{object_key_escaped}", value,
          headers)
      @s3.error?(response)
      @cache.delete(:objects)
      return get_object(object_key)
    end
def create_object ( object_key , value , metadata = { } ) object_key_escaped = S3 :: Object . escape_key ( object_key ) headers = { } metadata . each { | key , value | headers [ "x-amz-meta-#{key}" ] = value } response = @s3 . request_put ( "/#{@name}/#{object_key_escaped}" , value , headers ) @s3 . error? ( response ) @cache . delete ( :objects ) return get_object ( object_key ) end
Creates and returns a new S3::Object with the specified +object_key+ and
+value+.
Creates and returns a new S3 :: Object with the specified + object_key + and + value + .
object_key
<not_specific>
value
<not_specific>
metadata
<not_specific>