Rails paperclip uploading file outside rails app folder
I want to use paperclip plugin to upload the file but the problem is that i have 开发者_Python百科to save the uploaded file outside the rails app folder.
Tried searching it but did not help.
Thanks in advance
You can use :path to choose where to store the images:
has_attached_file :photo, :path => ":rails_root/public/:class/:attachment/:id/:style_:basename.:extension"
I haven't tried it myself (yet, but now I'm about to). Perhaps you could place a symbolic link inside of the Rails directory that points to the location outside you want written to.
精彩评论