Skip to content

新增文件上传限制配置,支持导出Markdown文件为ZIP格式;更新相关文档和API处理逻辑#58

Merged
239573049 merged 1 commit intomainfrom
feature/markdown
May 15, 2025
Merged

新增文件上传限制配置,支持导出Markdown文件为ZIP格式;更新相关文档和API处理逻辑#58
239573049 merged 1 commit intomainfrom
feature/markdown

Conversation

@239573049
Copy link
Member

This pull request introduces functionality to export warehouse documents as a Markdown ZIP file and sets a configurable maximum file upload size. The changes span backend, frontend, and documentation updates to support these features.

Backend Changes:

  • Added Markdown Export Logic:

    • Implemented the ExportMarkdownZip method in WarehouseService to generate and return a ZIP file containing Markdown files for all documents in a warehouse. This includes recursive handling of document catalogs. (src/KoalaWiki/Services/WarehouseService.cs, src/KoalaWiki/Services/WarehouseService.csR391-R495)
  • Introduced MaxFileLimit Configuration:

    • Added a MaxFileLimit property to OpenAIOptions and updated the InitConfig method to read its value from configuration. (src/KoalaWiki/Options/OpenAIOptions.cs, [1] [2]
    • Configured file upload size limits in Program.cs using the MaxFileLimit value. (src/KoalaWiki/Program.cs, src/KoalaWiki/Program.csR28-R37)

Frontend Changes:

  • Export Markdown Button:

  • Client API Updates:

    • Updated clientFetchApi to handle ZIP file responses and added a new ExportMarkdownZip service for triggering the export API. (web/app/services/api.ts, [1]; web/app/services/warehouseService.ts, [2]

Documentation Updates:

  • Configurable Options:

    • Documented the new MAX_FILE_LIMIT configuration in both English (README.md) and Chinese (README.zh-CN.md). [1] [2]
  • Graph Representation:

    • Updated the graph TD sections in both documentation files to include MAX_FILE_LIMIT. [1] [2]

@239573049 239573049 merged commit 91f448d into main May 15, 2025
@239573049 239573049 deleted the feature/markdown branch May 15, 2025 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant