Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where should uploaded files get stored in Rails 3.1?

When user uploads files. In Rails 3.0+, these would go into public/uploads. In 3.1, should uploaded files go to app/assets/uploads? Or still in public/uploads?

It's not really an issue in our environment, since we are using S3. Just trying to understand Rails 3.1's new directory structure.

What are your thoughts?

like image 983
Christian Fazzini Avatar asked May 24 '11 21:05

Christian Fazzini


2 Answers

the public directory, capistrano recommends public/system/

don't get confused by the app/assets directory, it's usually for css/js/coffeescript files, think this is the biggest change from 3.0 to 3.1

like image 152
vrsmn Avatar answered Sep 22 '22 16:09

vrsmn


Well, the answer is simple: your users will only have access to your /public directory.

There are just some tricks to get css and js but you'll have to stick with /public for the other stuff.

Generally, I put all stuff in /public/assets

like image 28
apneadiving Avatar answered Sep 18 '22 16:09

apneadiving