-->

如何在Ruby中实现一个进度条?(How to implement a progress bar i

2019-09-19 06:59发布

我们要实现文件上传进度条在我们的Ruby应用程序之一。 这需要显示上传的准确率。 然而,尽管我们尽了最大努力,我们未能找到一种方法来实现一个进度条恰好复制文件上传过程。

你能帮帮我们吗?

Answer 1:

如果您使用的是Apache和乘客,你可以使用Apache进度条模块。

截屏: http://www.railsillustrated.com/screencast-file-uploads-progress-in-rails-passenger.html

Apache模块和安装说明: http://drogomir.com/blog/2008/6/18/upload-progress-bar-with-mod_passenger-and-apache



Answer 2:

我已经使用mongrel_upload_progress过去,但我发现,这是一个相当复杂和棘手问题的解决方案。 我definitly建议看向乘客使用通阿帕奇为您的生产环境,虽然。



文章来源: How to implement a progress bar in Ruby?