Feat: Add Alibaba Cloud Storage Configuration#949
Merged
lyingbug merged 20 commits intoTencent:mainfrom Apr 14, 2026
Merged
Conversation
Add oss.go with full FileService implementation (SaveFile, SaveBytes, GetFile, DeleteFile, GetFileURL, CheckConnectivity) using aws-sdk-go-v2 with path-style addressing for Aliyun OSS. Includes temp bucket support and unit tests for parseOssFilePath and client creation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 添加判断oss2是否安装,未安装时打印错误日志 - 修改OSS桶不存在时不自动创建,避免误创建公共读桶 - OSS下载URL改为虚拟主机风格,提升兼容性 - OSS初始化错误、缺失配置时添加详细日志提示 - 其他存储类代码重排统一风格,提升可维护性
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
描述 (Description)
本 PR 为 WeKnora 项目添加阿里云 OSS(对象存储服务)作为新的存储引擎支持。用户可以通过 OSS 存储引擎上传、下载和管理知识库文件,同时提供完整的配置界面、连通性测试和状态报告功能。
主要变更包括:
后端 (Go)
internal/application/service/file/oss.go)oss_test.go)knowledgebase.go和tenant.go类型定义以支持 OSS 配置文档解析服务 (Python)
OssStorage类(docreader/parser/storage.py)oss2依赖到pyproject.toml和uv.lock前端
storage engine config)StorageEngineSettings.vue)文档
变更类型 (Type of Change)
影响范围 (Scope)
测试 (Testing)
测试步骤 (Test Steps)
检查清单 (Checklist)
相关 Issue
Fixes #
截图/录屏 (Screenshots/Recordings)
数据库迁移 (Database Migration)
配置变更 (Configuration Changes)
用户需要在系统设置中配置以下 OSS 参数:
oss_access_key- 阿里云 AccessKey IDoss_secret_key- 阿里云 AccessKey Secretoss_endpoint- OSS Endpoint(如oss-cn-hangzhou.aliyuncs.com)oss_bucket- Bucket 名称oss_region- 区域(如cn-hangzhou)部署说明 (Deployment Notes)
docreader服务已安装oss2Python 依赖包(已通过uv.lock更新)其他信息 (Additional Information)
变更统计
oss.go,oss_test.go)OssStorage技术说明