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

后端 未结 2 1994
天命终不由人
天命终不由人 2021-01-18 04:44

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(c

相关标签:
2条回答
  • 2021-01-18 05:23

    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 讨论(0)
  • 2021-01-18 05:26

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

    0 讨论(0)
提交回复
热议问题