Skip to content

Instantly share code, notes, and snippets.

@libryder
Created January 25, 2012 17:15
Show Gist options
  • Save libryder/1677383 to your computer and use it in GitHub Desktop.
Save libryder/1677383 to your computer and use it in GitHub Desktop.
Convert wav -> mp3 and upload to S3
class Medium < ActiveRecord::Base
attr_accessible :title, :wav
has_attached_file :wav,
:styles => {
:mp3 => {
:params => "-encode --vbr-new -V7",
:format => "mp3" }
},
:default_style => :normal,
:processors => [:wav_mp3],
:storage => :s3,
:s3_credentials => "#{RAILS_ROOT}/config/s3.yml",
:path => "/call_recordings/:filename"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment