upload_large_files.rb

Path: lib/fog/rackspace/examples/storage/upload_large_files.rb
Last Update: Sat Feb 23 07:12:02 +0000 2019

This example demonstrates uploading large files in segments

Required files

rubygems   fog  

Methods

Constants

SEGMENT_LIMIT = 5368709119.0   Size of segment. The Rackspace cloud currently requires files larger than 5GB to be segmented so we will choose 5GB -1 for a size docs.rackspace.com/files/api/v1/cf-devguide/content/Large_Object_Creation-d1e2019.html
BUFFER_SIZE = Excon.defaults[:chunk_size] || 1024 * 1024   Size of buffer to use for transfers. Use Excon‘s default chunk size and if that‘s not avaliable we will default to 1 MB

Public Instance methods

Use api key defined in ~/.fog file, if absent prompt for api key For more details on ~/.fog refer to fog.io/about/getting_started.html

Use username defined in ~/.fog file, if absent prompt for username. For more details on ~/.fog refer to fog.io/about/getting_started.html

[Validate]