Skip to content

Instantly share code, notes, and snippets.

@bigfolio
Created June 29, 2010 21:42
Show Gist options
  • Save bigfolio/457857 to your computer and use it in GitHub Desktop.
Save bigfolio/457857 to your computer and use it in GitHub Desktop.
>> require 'aws/s3'
=> true
>> include AWS::S3
=> Object
>> AWS::S3::Base.establish_connection!(:access_key_id => 'REDACTED', :secret_access_key => 'REDACTED')
=> #<AWS::S3::Connection:0x1016de910 ... :port=>80}>
>> file = S3Object.find 'tv/BF-TV-Episode-001.ogv', 'cloud.bigfolio.com'
=> #<AWS::S3::S3Object:0x2159355220 '/cloud.bigfolio.com/tv/BF-TV-Episode-001.ogv'>
>> file.content_type
=> "binary/octet-stream"
>> file.content_type = 'video/ogg'
=> "video/ogg"
>> file.store
=> true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment