mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-11 22:25:41 +08:00
feat(File Management): Refactor File List API and Add Knowledge Base Document Initialization (#13914)
### What problem does this PR solve? feat(File Management): Refactor File List API and Add Knowledge Base Document Initialization - Migrate the file list API endpoint from `/v1/file/list` to `/api/v1/files` to align with the Python implementation. - Add logic for initializing knowledge base documents; automatically create the `.knowledgebase` folder and associated documents when retrieving the root directory. - Enhance parameter validation and error handling, including the introduction of a new `CodeParamError` error code. - Optimize the file list response structure to match the implementation on the Python side. - Update the Vite configuration to support proxying the new `/api/v1/files` endpoint. ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@@ -31,6 +31,7 @@ const (
|
||||
CodeResourceExhausted ErrorCode = 107
|
||||
CodePermissionError ErrorCode = 108
|
||||
CodeAuthenticationError ErrorCode = 109
|
||||
CodeParamError ErrorCode = 110
|
||||
CodeLicenseValid ErrorCode = 320
|
||||
CodeLicenseInactiveError ErrorCode = 321
|
||||
CodeLicenseExpiredError ErrorCode = 322
|
||||
@@ -59,6 +60,7 @@ var errorMessages = map[ErrorCode]string{
|
||||
CodeResourceExhausted: "Resource exhausted",
|
||||
CodePermissionError: "Permission denied",
|
||||
CodeAuthenticationError: "Authentication failed",
|
||||
CodeParamError: "Invalid parameters",
|
||||
CodeLicenseValid: "License valid",
|
||||
CodeLicenseInactiveError: "License inactive",
|
||||
CodeLicenseExpiredError: "License expired",
|
||||
|
||||
Reference in New Issue
Block a user