How to display PowerPoint Presentation In Rails 4 Paperclip??/

元气小坏坏 提交于 2019-12-08 09:48:24

问题


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"

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


回答1:


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.

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.

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



来源:https://stackoverflow.com/questions/26101083/how-to-display-powerpoint-presentation-in-rails-4-paperclip

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!