Rails 4, asset pipeline causes user downloadable files to be downloaded twice

前端 未结 2 815
执笔经年
执笔经年 2021-01-14 03:21

I have a folder in my app directory named \"uploads\" where users can upload files and download files. I don\'t want the uploads folder to be in the public directory becaus

2条回答
  •  北荒
    北荒 (楼主)
    2021-01-14 03:47

    For anyone having this problem, I solved it. Pass

    'data-no-turbolink' => true 
    

    into the link_to helper to stop Turbolinks from messing with the download.

    https://github.com/rails/turbolinks/issues/182

提交回复
热议问题