开发者

streaming files in ruby on rails

开发者 https://www.devze.com 2022-12-26 02:48 出处:网络
I just uploaded files(doc &开发者_高级运维 pdf) in my web server(with my coding). I want to stream those files when I click download link on my page.

I just uploaded files(doc &开发者_高级运维 pdf) in my web server(with my coding). I want to stream those files when I click download link on my page.

please share any tutorials or any suggestions?


How do you store them? On disk? In database?
The send_file is the api function that sends the file ... Also, read this: http://john.guen.in/past/2007/4/17/send_files_faster_with_xsendfile/


Used send_file in ruby..

send_file(file_to_send, :disposition => "attachment")
0

精彩评论

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