alist 通过 iframe 嵌入 onlyoffice 的预览与编辑方式分享 #8271
LainHE
started this conversation in
Show and tell
Replies: 3 comments 3 replies
-
感谢您分享关于通过 iframe 嵌入 OnlyOffice 进行预览与编辑的详细过程和代码示例。这是一个非常有用的指南,特别是对于那些希望在本地局域网中使用 Alist 和 OnlyOffice 的用户。 如果您有任何具体的问题或者需要进一步的优化建议,请随时告诉我,我会尽力帮助您。 🪧 TipsFor further assistance, please describe your question in the comments and @petercat-assistant to start a conversation with me. |
Beta Was this translation helpful? Give feedback.
0 replies
-
好干净的页面,请问放大缩小的+-如何放到右下角那个全屏位置 |
Beta Was this translation helpful? Give feedback.
2 replies
-
大佬为什么预览可以,编辑模式报404?是PHP环境的问题吗? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
序言
整个摸索过程极其漫长(回调程序给我整麻了),这篇文章很难完全将所有过程及内容全部囊括进去,本人尽量将所有内容分享出来,希望对各位有些许帮助。
有任何优化建议都可以互相讨论!
以下是一些特别说明:
--add-host=host.docker.internal:host-gateway
用于保证链接。需要进入onlyoffice容器中,修改配置文件
/etc/onlyoffice/documentserver/default.json
,注意以下两个内容:"rejectUnauthorized": false
request-filtering-agent
中的allowPrivateIPAddress
、allowMetaIPAddress
均为true
第1点是关闭ssl,第2点是允许使用IP访问,默认是只使用域名访问。
预览模式
预览模式不需要php回调,只需要nginx即可,如不知具体操作方法,请见参考:Pwolf私人博客 - 局域网内部署alist和onlyoffice
view.html
编辑模式
编辑模式除开nginx,还需php执行回调程序
edit.html
callback.php
config.ini
补充
nginx配置
defalut.conf
alist设置
前序工作做完后,需在 alist管理 - 设置 - 预览 - Iframe预览 进行修改
参考
官方文档 - alist api - 获取token
官方文档 - alist api - 流式上传文件
官方文档 - onlyoffice 回调程序
官方文档 - onlyoffice 编辑模式
Github讨论#3255 - 预览模式
Github讨论#3899 - 编辑模式
Pwolf私人博客 - 局域网内部署alist和onlyoffice
Beta Was this translation helpful? Give feedback.
All reactions