lib/redrax/files.rb
# This is both a delete and update operation. Metadata supplied as arguments
# to this method replace whatever metadata may already exist on a File.
# Be aware that this is significantly different from 
# {Container::update_metadata}.
# @param file_name [String] Name of the container to update metadata on
# @param args [Hash] Key-values to set as metadata on this object.
This is both a delete and update operation. Metadata supplied as arguments
to this method replace whatever metadata may already exist on a File.
Be aware that this is significantly different from
{Container::update_metadata}.
This is both a delete and update operation . Metadata supplied as arguments to this method replace whatever metadata may already exist on a File . Be aware that this is significantly different from { Container :: update_metadata } .
def replace_metadata(container_name, file_name, args = {})
      validate_path_elements(container_name, file_name)
      client.request(
        method:   :post,
        path:     "#{container_name}/#{file_name}",
        expected: 202,
        headers:  MetadataMarshaller.new.call(
          args,
          "X-Object-Meta-",
          wrong: "X-Remove-Object-Meta-"
        )
      )
    end
def replace_metadata ( container_name , file_name , args = { } ) validate_path_elements ( container_name , file_name ) client . request ( method : :post , path : "#{container_name}/#{file_name}" , expected : 202 , headers : MetadataMarshaller . new . call ( args , "X-Object-Meta-" , wrong : "X-Remove-Object-Meta-" ) ) end
This is both a delete and update operation.
This is both a delete and update operation .
container_name
file_name
Name of the container to update metadata on
Name of the container to update metadata on
args
Key-values to set as metadata on this object.
Key - values to set as metadata on this object .