saurb
saurb

Reputation: 685

How to upload audio files using Paperclip in Rails 3?

I'm very new to Rails. Basically, I have a Sound model that uploads an audio file(wav) and store it somewhere on the local machine (for testing). How to set it up using Paperclip? I googled but unfortunately most of the tutorials are about image uploading:-(

Any inputs are greatly appreciated.

Upvotes: 8

Views: 3097

Answers (1)

Jeremy Woertink
Jeremy Woertink

Reputation: 146

class Sound
  has_attached_file :audio  ,
                    :url => "/assets/:class/:id/:attachment/:style.:extension",
                    :path => ":rails_root/public/assets/:class/:id/:attachment/:style.:extension"

end

Upvotes: 13

Related Questions