如何在 Ruby 中实现进度条?

发布于 2024-07-27 17:07:09 字数 126 浏览 2 评论 0原文

我们想要在我们的 Ruby 应用程序之一中实现文件上传的进度条。 这需要显示上传的确切百分比。 然而,尽管我们尽了最大努力,我们还是找不到一种方法来实现完全复制文件上传过程的进度条。

您能帮我们解决这个问题吗?

We want to implement a progress bar for file uploading in one of our Ruby application. This needs to show the exact percentage of the upload. However, despite our best efforts we could not find a way to implement a progress bar that exactly replicate the file upload process.

Can you please help us with this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

失眠症患者 2024-08-03 17:07:09

如果您使用 Apache 和 Passenger,则可以使用 Apache 进度条模块。

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

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

If your are using Apache and Passenger, you can use the Apache progress bar module.

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

Apache Module and installation instructions:
http://drogomir.com/blog/2008/6/18/upload-progress-bar-with-mod_passenger-and-apache

没︽人懂的悲伤 2024-08-03 17:07:09

我过去曾使用过 mongrel_upload_progress ,但我发现这是一个相当复杂且微妙的问题解决方案。 不过,我绝对建议您在生产环境中通过 apache 使用乘客。

I have used mongrel_upload_progress in the past, but I found that it was quite a complex and delicate solution to the problem. I'd definitly recommend looking towards using passenger thru apache for your production environment, though.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文