Skip to content

Instantly share code, notes, and snippets.

@joelio
Created September 18, 2013 01:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joelio/37f02f0f76bd4f3ba234 to your computer and use it in GitHub Desktop.
Save joelio/37f02f0f76bd4f3ba234 to your computer and use it in GitHub Desktop.
AWS.config(
:access_key_id => 'x',
:secret_access_key => "x",
:s3_force_path_style => true,
:s3_endpoint => 'ap-r310-6.int',
:s3_port => 80,
:use_ssl => false
)
bucket_name = 'adsasdasdfsworking'
file_name = '20130915_180000_bbctwohd_the_great_british_bake_off.ts'
s3 = AWS::S3.new
bucket = s3.buckets.create(bucket_name)
bucket.objects['multi'].multipart_upload do |upload|
files = Dir.glob(File.join("x*"))
files.sort.each { |chunk|
upload.add_part(:file => chunk )
puts chunk
}
upload.complete
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment