Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] [Feature Request] 集成自定义 WebDAV 同步功能 #3078

Closed
bakamake opened this issue Jun 28, 2024 · 7 comments
Closed

[Request] [Feature Request] 集成自定义 WebDAV 同步功能 #3078

bakamake opened this issue Jun 28, 2024 · 7 comments
Labels
🌠 Feature Request New feature or request | 特性与建议

Comments

@bakamake
Copy link

🥰 需求描述

希望能够为 Docker 自部署版本添加自定义 WebDAV 同步功能,以便实现以下两个主要目标:

1在同一机器上部署的网页端配置同步。
2"最好"还能实现不同设备的网页端配置同步。

🧐 解决方案

开发 WebDAV 模块:基于已有的 WebDAV 协议标准,开发一个适用于 LobeChat 的 WebDAV 模块。该模块应支持基本的文件上传、下载、删除和更新操作。
设计配置文件管理机制:创建一套配置文件管理机制,允许用户通过 WebDAV 服务器上传和下载配置文件。这包括自动检测配置更改、增量更新策略以及冲突解决机制等。具体步骤如下:
初始化同步:用户首次连接到 WebDAV 服务器时,进行一次全量同步,将所有相关配置文件下载到本地。
增量更新:在后续的使用过程中,仅同步发生更改的配置文件部分,以减少数据传输量和提高效率。
冲突解决:当多个设备同时修改同一配置文件时,系统应能够智能地处理冲突并给出合理的解决方案(如提示用户选择保留哪个版本的更改)。
集成用户界面支持:在用户界面中添加设置选项,允许用户输入 WebDAV 服务器的地址、用户名和密码等信息。同时,提供手动同步按钮以便用户手动触发同步操作。具体步骤如下:
设置页面:创建一个新的设置页面或扩展现有设置页面,包含与 WebDAV 相关的所有选项(如服务器地址、认证信息等)。
手动同步按钮:在界面上显眼位置放置一个“立即同步”按钮或图标,方便用户随时发起手动同步请求。点击后系统将尝试与指定的 WebDAV 服务器建立连接并执行相应的同步操作(上传或下载)。如果遇到任何错误(如网络问题、权限不足等),则向用户显示友好的错误提示信息并指导其如何解决问题(如检查网络连接状态、确认输入的服务器地址是否正确无误等)。

📝 补充信息

No response

@bakamake bakamake added the 🌠 Feature Request New feature or request | 特性与建议 label Jun 28, 2024
@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


🥰 Description of requirements

I would like to be able to add custom WebDAV synchronization capabilities to the Docker self-deployment version to achieve the following two main goals:

1Synchronize the web configuration deployed on the same machine.
2. "Best" can also synchronize the web configuration of different devices.

🧐 Solution

Develop WebDAV module: Based on the existing WebDAV protocol standard, develop a WebDAV module suitable for LobeChat. The module should support basic file upload, download, delete and update operations.
Design a configuration file management mechanism: Create a configuration file management mechanism that allows users to upload and download configuration files through the WebDAV server. This includes automatic detection of configuration changes, incremental update strategies, and conflict resolution mechanisms. Specific steps are as follows:
Initial synchronization: When the user connects to the WebDAV server for the first time, a full synchronization is performed and all relevant configuration files are downloaded locally.
Incremental update: During subsequent use, only the changed parts of the configuration file are synchronized to reduce the amount of data transfer and improve efficiency.
Conflict resolution: When multiple devices modify the same configuration file at the same time, the system should be able to intelligently handle conflicts and give reasonable solutions (such as prompting the user to choose which version of the changes to keep).
Integrated UI support: Adds settings options to the UI that allow users to enter information such as the WebDAV server's address, username, and password. At the same time, a manual synchronization button is provided so that users can manually trigger synchronization operations. Specific steps are as follows:
Settings Page: Create a new settings page or extend an existing settings page with all options related to WebDAV (such as server address, authentication information, etc.).
Manual synchronization button: Place a "Sync now" button or icon in a prominent position on the interface to facilitate users to initiate manual synchronization requests at any time. After clicking, the system will try to establish a connection with the specified WebDAV server and perform the corresponding synchronization operation (upload or download). If any errors are encountered (such as network problems, insufficient permissions, etc.), a friendly error message will be displayed to the user and guide them how to solve the problem (such as checking the network connection status, confirming whether the entered server address is correct, etc.).

📝 Supplementary information

No response

@lobehubbot
Copy link
Member

👀 @bakamake

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

@Sun-drenched
Copy link

lobechat 1.X版已经基于服务端数据库实现了相关同步功能,并且可以使用docker自部署(只是目前还比较麻烦)。

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Lobechat version 1.

@arvinxx
Copy link
Contributor

arvinxx commented Jun 29, 2024

没特殊原因的话,应该不会考虑做 WebDAV 了

@arvinxx arvinxx closed this as completed Jun 29, 2024
@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


If there is no special reason, I probably won’t consider using WebDAV.

@lobehubbot
Copy link
Member

@bakamake

This issue is closed, If you have any questions, you can comment and reply.
此问题已经关闭。如果您有任何问题,可以留言并回复。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌠 Feature Request New feature or request | 特性与建议
Projects
None yet
Development

No branches or pull requests

4 participants