Files
book-comic-library/docs/CHANGELOG.md
T

2.9 KiB
Raw Blame History

Changelog / 更新日志

All notable non-WebUI user-visible changes should be documented in this file, newest version on top. 本文件记录所有非 WebUI 的重要用户可见变更,最新版本在最上方。

The format loosely follows Keep a Changelog and can be adapted to the team's habits. 本文档参考了 Keep a Changelog 的思路,也可以根据团队习惯调整。

[Unreleased]

Added / 新增

  • API: resumable chunked upload protocol for large files — POST /api/libraries/:id/upload/init (fingerprint-derived deterministic uploadId, rejects totals over UPLOAD_MAX_MB with 413 too_large), PUT /api/uploads/:uid/parts/:index (parts ≤ 32MB), GET /api/uploads/:uid (received parts, for resume), POST /api/uploads/:uid/complete (assemble + atomic land, same path contract as single-POST upload). Sessions persist under BOOKS_DIR/.uploads/ with 24h opportunistic sweep. UPLOAD_MAX_MB is now wired through both compose stacks/.env; .env.example sets 2048 and drops NGINX_CLIENT_MAX_BODY_SIZE to 32m (nginx only ever sees one chunk).
  • API: 新增大文件可续传分片上传协议——POST /api/libraries/:id/upload/init(按指纹派生确定性 uploadId,总量超 UPLOAD_MAX_MB 返回 413 too_large)、PUT /api/uploads/:uid/parts/:index(单片 ≤32MB)、GET /api/uploads/:uid(查询已传分片以续传)、POST /api/uploads/:uid/complete(拼接后原子落盘,返回与单发上传一致的 path)。会话存于 BOOKS_DIR/.uploads/,超 24h 顺手清理。UPLOAD_MAX_MB 已接入两份 compose/.env;.env.example 调至 2048 并将 NGINX_CLIENT_MAX_BODY_SIZE 降为 32m(nginx 只见单个分片)。

Changed / 变更

  • API: upload over UPLOAD_MAX_MB now returns 413 too_large with the limit in the message; previously the size abort was misreported as 400 bad_request "multipart field 'file' required".
  • API:超过 UPLOAD_MAX_MB 的上传现在返回 413 too_large 并在消息中带上限额;此前体积超限被误报为 400 bad_request "multipart field 'file' required"。
  • API: POST /api/libraries now takes only {name}; root_path is generated server-side as BOOKS_DIR/<sanitized name> (no client-supplied paths, validated at creation).
  • API:POST /api/libraries 只需 {name};root_path 由服务端生成为 BOOKS_DIR/<清洗后的库名>(不再接受客户端指定路径,创建时即校验)。
  • Repo structure conformed to AGENTS.md: web/ renamed to frontend/; backend HTTP layer moved from internal/api to cmd/webui/{api,handlers} (cmd/server → cmd/webui); README/CHANGELOGs relocated under docs/ (README_zh.md added as Chinese mirror); module-level .gitignores added (backend/, deploy/); stray root library/ removed (book files live in deploy/api/storage/); debug binaries untracked.
  • Docs: docs/README.md is now the English primary; previous Chinese README mirrored to docs/README_zh.md.