feat(driver): add Cloudflare Image Bed support#2427
feat(driver): add Cloudflare Image Bed support#2427ZZ0YY wants to merge 13 commits intoOpenListTeam:mainfrom
Conversation
|
可能违反使用政策 |
不好意思 不熟悉流程,急于询问相关要求 所以提了个 issue。入门试一试,前端构建文件忘记弄回去了 |
应该没有吧,单纯看使用者使用什么存储后端,比如我自己是用 S3和 Cloudflare 自己的对象存储,完全合规。较少使用Huface 和 telegram 存储文件 |
- Rename driver identifier and directory to 'cloudflare_imgbed' for consistency. - Remove invalid 'replace' directive in go.mod. - Restore accidentally modified/deleted files in public/dist. - Update driver registration in drivers/all.go. Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
…tion with improved error handling and pagination
|
不好意思 刚刚在调试 build 工作流 拉 snap 老是不成功 |
|
已考虑和测试,无法实现大于 100 MB 的文件上传,受限于 cloud flare,故才来提交这个新驱动 而且其实在 AI 的帮助下,上传逻辑也写好了,不过感觉测试还不够充分,我只简单地测试了一下,上传大于 100mb 的文件成功了,目前是处于能用的阶段, 但是我感觉写法不够完善,担心可能增加您审核的负担,三天后 我又要开学了🥲 |
|
@j2rong4cn 您好 看到您标记为草稿我以为我写得不好来着 已经在改了 刚才在搞上传相关的逻辑,这里也有一些变动,避免重复修改,推荐您等我写好完整的再一起看吧,应该快完成了 |
|
分片上传参考可以这个,stream.NewStreamSectionReader + errgroup.NewOrderedGroupWithContext OpenList/drivers/123_open/upload.go Lines 45 to 172 in 7e37c40 |
…performance - Added support for standard multipart form upload with zero-copy streaming. - Implemented HuggingFace LFS direct upload for large files (>20MB). - Integrated with OpenList global rate limiter and progress tracking. - Optimized memory usage using io.MultiReader for request body construction. - Added configurable upload threads for chunked HF uploads. - Support auto mkdir dir when in upload
|
@j2rong4cn 您好 已经完成上传模块编写并且测试完成,正是学习123open。
|
|
路径处理其实很简单的,你看着改吧dc74222 |
|
Obj的ID和Path只在当前驱动使用,List返回什么值,Put、Link等方法就会收到什么 |
感谢指导,之前吃了亏。现已精简逻辑,确实可运行 |
…prove initialization logic
|
我没测试 |












Description / 描述
目前实现了列表和下载功能,上传功能后续再做,已完成列表,下载,上传,上传时自动创建文件夹先提一个 PR,看看意见Add a new storage driver for Cloudflare Image Bed https://github.com/MarSeventh/CloudFlare-ImgBed
(a popular image hosting solution based on Cloudflare Workers & KV/D1).
Features implemented:
RootPath(subdirectory) mounting.为 Cloudflare Image Bed
https://github.com/MarSeventh/CloudFlare-ImgBed
(基于 Cloudflare Workers 和 KV/D1 的图床方案)新增存储驱动。
实现功能:
Motivation and Context / 背景
Cloudflare Image Bed is a lightweight and free-tier-friendly image hosting tool. Integrating it into OpenList allows users to manage their Cloudflare-based image assets alongside other storage services.
Cloudflare Image Bed 是一个轻量且对免费用户友好的图床工具。通过将其集成到 OpenList,用户可以方便地与其他存储服务一起管理其在 Cloudflare 上的图片资产。
Relates to #376 (Add more storage drivers)
How Has This Been Tested? / 测试
Environment: Go 1.24, Windows 10.
Manual Test:
RootPath.Debug: Used
restydebug mode to ensure HTTP requests/responses are handled correctly.环境:Go 1.24, Windows 10。
手动测试:
调试:开启
resty的调试模式,确保 HTTP 请求和响应逻辑无误。Checklist / 检查清单
我已阅读 CONTRIBUTING 文档。
go fmt.我已使用
go fmt格式化提交的代码。我已为此 PR 添加了适当的标签。
我已相应更新了相关仓库。