Reputation: 5629
I want to use paperclip to upload files to server. Errors are all cleaned now, but I don't know how to set the upload path.
My code looks like this:
upload class:
puts has_attached_file :image, :default_url => :file_system
validates_attachment_content_type :image, :content_type => [:image, 'audio/mpeg', 'application/mp3', 'application/octet-stream']
I want to save uploads in project/public/uploads.
How can I realise this?
Upvotes: 0
Views: 52
Reputation: 1228
Then it should look like this:
has_attached_file :image,
:path => ":rails_root/public/uploads/:filename",
:url => "/uploads/:filename"
Upvotes: 1