Ruby on Rails send_file doesn't work until i refresh the page?

后端 未结 4 1118
执念已碎
执念已碎 2020-12-11 10:39

I am working on a Rails server which I can download my locally stored movies and anime etc from. This is kind of working but when I click the download link I have to refresh

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-11 11:04

    Move the file to public folder
    add only file name into link_to

    <%= link_to "Downloadable File", "/"+filename, %>
    

提交回复
热议问题