我的项目基于Node.js(支持结束)和AngularJs(前端),所以我想在我的网页中打开Office文件(.doc .ppt等)。我的文件存储在Amazon s3服务器中。我想将这些文件打开到我的网页中。
所以我需要谷歌驱动器类似的功能来查看文件。
任何的想法?
如果您只想查看,可以通过<iframe>
通过<iframe>
或Microsoft Office 365查看器使用Google文档查看器。
<iframe src="http://docs.google.com/gview?url=http://remote.url.tld/path/to/document.doc&embedded=true"></iframe>
要么
<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=http://remote.url.tld/path/to/document.doc' width='1366px' height='623px' frameborder='0'>This is an embedded <a target='_blank' href='http://office.com'>Microsoft Office</a> document, powered by <a target='_blank' href='http://office.com/webapps'>Office Online</a>.</iframe>
从How do I render a Word document (.doc, .docx) in the browser using JavaScript?获得的解决方案