开发者

Rails 3.1: Should File Uploads be added to asset pipeline?

I have a rails 3.1 application that allows users to upload pictures. Should these pictures be stored as assets(in app/assets) and therefore be subject to Sprocket overhead(caching, fingerprinting, etc.)? Or should I keep them in public/images a开发者_如何学运维nd store them outside of the asset pipeline?


The asset/image is IMHO for structural/design images (background, icons, banners etc). Dynamically added pictures/assets should go in the public directory.


I've had this trouble and it was a permissions problem. If you are running under apache with the www-data user do this:

sudo chgrp -R www-data public
sudo chmod g+rws public
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜