如何在 Rails 4 Paperclip 中显示 PowerPoint 演示文稿?/ [英] How to display PowerPoint Presentation In Rails 4 Paperclip??/

查看:45
本文介绍了如何在 Rails 4 Paperclip 中显示 PowerPoint 演示文稿?/的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序中,我使用回形针 gem 上传了 PPT、PPTX 文件.我有这样的网址

In my application, i have uploaded PPT,PPTX files using paperclip gem. I have url like this

" Presentation.last.avatar.url" = "/system/presentations/avatars/000/000/006/original/example.ppt?1411994371"

" Presentation.last.avatar.url" = "/system/presentations/avatars/000/000/006/original/example.ppt?1411994371"

现在我想在我的本地浏览器中显示那些 PPT 和 PPtx 文件.请给我建议..谢谢

Now i want to display those PPT, and PPtx files in my localhost web browser. please give me suggestions.. thanks

推荐答案

假设您的意思是希望它们嵌入到浏览器中,我已经通过将它们上传到 Scribd 在后台,然后显示嵌入的小部件.这是一个很好的解决方案,因为将 PPT 文件转换为干净的 HTML 很困难(所以让其他人解决),而且您不必为这些文件的托管或带宽付费.

Assuming you mean that you want them to be embedded in the browser, I've solved this by uploading the them to Scribd in the background and then displaying the embedded widget. This is a great solution because turning a PPT file into clean HTML is hard (so let someone else work it out), and you do not have to pay for hosting or bandwidth for those files.

这样做比强制用户为他们的浏览器安装 Office 插件要好得多,这取决于他们可能没有的平台.

It's a lot nicer to do it this way than to force the user to have an Office plugin installed for their browser, which depending on their platform they may not have.

Scribd_fu gem 可以与 Paperclip 一起使用,或者您可以使用官方的 RScribd gem 并推出您自己的.

The Scribd_fu gem will work with Paperclip, or you could use the official RScribd gem and roll your own.

这篇关于如何在 Rails 4 Paperclip 中显示 PowerPoint 演示文稿?/的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆