# File lib/cloudfiles/storage_object.rb, line 140 def set_metadata(metadatahash) headers = {} metadatahash.each{ |key, value| headers['X-Object-Meta-' + key.to_s.capitalize] = value.to_s } response = self.container.connection.storage_request("POST", @storagepath, headers) raise CloudFiles::Exception::NoSuchObject, "Object #{@name} does not exist" if (response.code == "404") raise CloudFiles::Exception::InvalidResponse, "Invalid response code #{response.code}" unless (response.code =~ /^20/) true end