乐于分享
好东西不私藏

Seafile网盘集成ONLYOFFICE白标定制版

Seafile网盘集成ONLYOFFICE白标定制版

本教程实现通过定义seahub_settings.py中的变量来实现对ONLYOFFICE文档服务进行个性化设置。

前置条件:

具有白标定制功能的ONLYOFFICE文档服务,体验镜像:

openoffice/documentserver:9.4.0-api

部署ONLYOFFICE文档服务:

ONLYOFFICE文档9.4版快速体验

部署Seafile网盘:

https://manual.seafile.com/13.0/setup/setup_ce_by_docker/#getting-started

** 部署Seafile网盘前需修改.env文件中使用的seafile镜像

SEAFILE_IMAGE=seafileltd/seafile-mc:13.0-latest

修改为

SEAFILE_IMAGE=openoffice/seafile-mc:13.0

配置ONLYOFFICE:

在seahub_settings.py中加入:

ENABLE_ONLYOFFICE = TrueONLYOFFICE_APIJS_URL = 'http://your_ip:your_port/web-apps/apps/api/documents/api.js'ONLYOFFICE_JWT_SECRET = 'your_jwt_secret'ONLYOFFICE_JWT_HEADER = 'Authorization'VERIFY_ONLYOFFICE_CERTIFICATE = TrueONLYOFFICE_FORCE_SAVE = True# NOTE# The following two configurations, do NOT need to configure them explicitly.# The default values are as follows.# If you have custom needs, you can also configure them, which will override the default values.ONLYOFFICE_FILE_EXTENSION = ('doc''docx''ppt''pptx''xls''xlsx''odt''fodt''odp''fodp''ods''fods''ppsx''pps''csv''pdf')ONLYOFFICE_EDIT_FILE_EXTENSION = ('docx''pptx''xlsx''csv')OFFICE_PREVIEW_MAX_SIZE = 30 * 1024 * 1024# preview size, 30 MB# 以下为个性化配置ONLYOFFICE_EXTRA_CONFIG = {  "about"False,  "feedback": {    "url""https://example.com",    "visible"False  },  "help"False,  "suggestFeature"False,  "logo": {    "image""https://example.com/logo.png",    "imageDark""https://example.com/dark-logo.png",    "imageLight""https://example.com/light-logo.png",    "url""https://example.com",    "visible"False  },  "compactToolbar"True}

根据实际情况修改以上参数后重启seafile服务即可生效。