Reputation: 3764
I am using paperclip gem for uploading. And i want to save the uploaded file/image outside of the public folder. If you have any idea please share.
Upvotes: 1
Views: 955
Reputation: 7723
Actually there is many. The 'public' option is just to be able to test easily. For your production server, paperclip gives three options:
File storage can be configured to go to any folder you want with something like:
config.paperclip_defaults = {
:path => "/yourfolder/:basename.:extension"
}
This can be overridden on the class itself if needed:
has_attached_file :avatar,
:path => "/yourotherfolder/:basename.:extension"
Upvotes: 2