Commit Graph
57 Commits
Author SHA1 Message Date
Marrrrrrrrry bb95017aa3 fix: save_file accepts plain binary streams; repair admin local file share (D2)
- storage contract drops UploadFile in favor of BinaryIO (+content_type param),
  completing the framework decoupling of the storage layer
- LocalFileClass.read() leaked an open fd and its handle was passed where
  save_file expected UploadFile — /admin/local/share 500ed on every call;
  now reads bytes via with-block and shares correctly (regression tests added)
- OneDrive save_file additionally had save_path called as a function — fixed
2026-09-09 18:53:31 +08:00
Marrrrrrrrry 832266101e refactor: storage returns StoredDownload data; view layer builds starlette responses 2026-09-09 17:13:34 +08:00
Marrrrrrrrry ad3d319362 refactor: storage raises framework-neutral StorageError rendered identically by app handler 2026-09-09 17:07:43 +08:00
Marrrrrrrrry 892fb24ffc refactor: storage layer accepts plain StoredFile refs and caller-fetched chunk records (core/ is now ORM-free) 2026-09-09 17:05:38 +08:00
Marrrrrrrrry 81d33b70de refactor: extract shared chunk-record fetch and hash verification into storage base class 2026-09-09 16:41:29 +08:00
vastsa 5537f56b88 fix(logging): reduce production log noise 2026-09-01 23:56:08 +08:00
zhou-kkk cebac32145 fix: sanitize chunk upload file_name to prevent path traversal 2026-08-29 12:13:39 +08:00
Lan ae7702603a Merge pull request #496 from vastsa/fix/pr494-security-patches
fix: harden share expiry, download token, quota SQL, and CORS
2026-07-23 19:41:40 +08:00
vastsa a41693f90d fix: harden share expiry, download token, quota SQL, and CORS
Apply the useful security fixes from PR #494 with review corrections:
validate expire_style through a shared helper, accept previous download
token window, detect SQL dialect via Tortoise capabilities, close remote
download sessions on client abort, and disable invalid CORS credentials.
2026-07-23 19:38:50 +08:00
vastsa 00f3abd3b2 fix: patch CVE dependencies and path traversal risks
Upgrade aiohttp and related packages, harden local file and storage path checks, tighten password/JWT comparisons, and default Docker forwarded IP trust to empty.
2026-07-21 14:49:30 +08:00
Lan 8d6eaacb70 fix: #478 make s3 upload confirmation resilient 2026-06-05 11:33:21 +08:00
Lan 3fe136536e fix: #461 support s3 path style addressing 2026-06-05 11:32:31 +08:00
Lan 2e5dc532a0 perf: optimize memory usage for large file uploads 2026-01-25 21:28:16 +08:00
jerryliang ade5799db4 fix: 仅在获取到文件大小时才设置 Content-Length 头 2026-01-16 17:55:12 +08:00
jerryliang 6b728abbeb perf: 复用ClientSession提升文件下载性能 2026-01-16 17:33:22 +08:00
jerryliang ff1943d60c fix: 使用标准方法编码下载文件名 2026-01-16 17:18:14 +08:00
jerryliang 442ef5b0e0 feat: 优化文件下载响应中的Content-Length获取逻辑
为所有存储后端添加文件大小获取逻辑,优先从实际存储系统获取文件大小,失败时回退到数据库记录的大小
2026-01-16 16:53:39 +08:00
jerryliang 34e36944bd feat: 在所有存储实现中添加Content-Length响应头 2026-01-16 16:44:06 +08:00
jerryliang ba8802ad75 feat: 为所有存储后端实现流式文件下载
将文件下载方式从全量读取改为流式传输,减少内存占用并提高大文件下载性能
支持S3、OneDrive、OpenDAL和WebDAV存储后端的流式下载
添加错误处理和HTTP异常捕获
2026-01-16 15:45:12 +08:00
Lan 8e57a497f7 feat: 支持S3预签名上传 2025-12-31 03:25:09 +08:00
Lan c1966b3942 feat: s3适配切片上传 2025-12-01 15:13:33 +08:00
Lan bd6f646f5d fix: some error 2025-12-01 11:30:52 +08:00
Do1e e41b3e1688 fix: 下载文件类型不符的问题 #372 2025-08-05 17:25:25 +08:00
Lan eeb70c7f44 fix: #349 2025-05-21 00:14:40 +08:00
Lan 136ea5830f fix: 适配webdav在window环境下路径 2025-04-25 22:31:06 +08:00
Lan c430af3d82 feat: 适配alist webdav 2025-04-19 17:58:58 +08:00
Lan fdada809d9 wip: 切片上传、文件秒传、断点续传陆续适配中当前进度(本地存储已适配) 2025-02-23 20:49:51 +08:00
Lan 4d7c9deabf fix: Fix abnormal Chinese names in downloaded files in the background #200 2025-02-16 23:37:53 +08:00
Lan 1ff1d6c695 style: code format 2025-02-15 22:00:53 +08:00
Lan f2f301f515 feat: 更新readme 2025-02-09 21:08:18 +08:00
Lan 8973abdf2f fix: 修复webdav空文件夹未删除 2025-02-09 20:52:14 +08:00
Lan 037949b715 feat: 新增webdav存储 2025-02-09 20:25:23 +08:00
lan e421ab93bc update:存储改成单例模式,修复读取问题 2024-06-18 23:04:52 +08:00
lan a891fbe826 feat: 新增后台选择过期方式 2024-06-15 20:04:48 +08:00
lan 8215ef9e4b fix: 修复文本取件问题 2024-05-06 13:02:00 +08:00
buyfakett 3563b86b82 后端移动文件夹,前端在docker中编译,进一步减小镜像大小 2024-05-02 00:29:33 +08:00
lan 4a353051d5 fix: 支持自定义s3协议region name和signature version,解决cloudflare r2文件取回问题 2024-04-29 22:11:56 +08:00
Tslmuun 1bca0e007b 添加S3 hostname选项
方便从S3 cdn域名下载文件。
2023-12-30 18:19:15 +08:00
lan d5659ebc9c update:images 2023-12-06 08:37:33 +08:00
Do1e 0f32265043 fix: #94 add s3_proxy and onedrive_proxy config 2023-11-28 19:09:54 +08:00
lan 0fd31b41c9 fix:issue #99 2023-10-24 14:02:28 +08:00
lan 5b14506f8c test:1 2023-08-26 18:17:02 +08:00
silver-ymz a198886d11 feat: support server transfer for opendal
Signed-off-by: silver-ymz <yinmingzhuo@gmail.com>
2023-08-24 14:04:00 +08:00
silver-ymz 5d48680cdd feat: add integration with opendal
Signed-off-by: silver-ymz <yinmingzhuo@gmail.com>
2023-08-23 16:41:01 +08:00
Do1e c38ffe3916 fix: OneDriveFileStorage下载文件的文件名与上传时不一致的问题 2023-08-19 20:20:01 +08:00
Do1e bc780208c4 add: OneDriveFileStorage 2023-08-18 20:00:48 +08:00
lan d91d64cad5 update:自动删除过期文件 2023-08-15 22:37:54 +08:00
lan d00cef42a1 update:env 2023-08-15 17:23:30 +08:00
lan a4d85bce27 update:存储 2023-08-15 10:05:50 +08:00
lan badfb28a27 add:fronted 2023-08-14 14:22:10 +08:00