Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
cf = Redrax::CloudFiles.new
cf.configure!(
user: ENV['RAX_USERNAME'],
api_key: ENV['RAX_API_KEY'],
region: :iad
)
cf.authenticate!
container_name = "test_container"
file_name = "test_file"
body = "test body"
containers = cf.containers
files = cf.files
containers.create(container_name)
files.create(container_name, file_name, body)
files.create_with_metadata(container_name + "_meta", file_name, body, foo: "bar")
file = files.get(container_name, file_name)
body = files.get_body(container_name, file_name)
files.delete(container_name, file_name)
container.delete(container_name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment