Skip to main content

Module files_api

Module files_api 

Source
Expand description

Files API endpoints - Database-backed local file management

Provides persistent file storage with metadata in SQLite and content in app data folder. Supports nested folder hierarchy and 10MB file size limit.

Structs§

CreateFolderRequest
DeleteQuery
FileEntryResponse
Response structure for file entries (compatible with frontend)
SearchQuery
UploadQuery

Functions§

create_folder
POST /files/folder - Create a new folder
delete_file
DELETE /files - Delete a file or folder (by id or path query param)
delete_file_by_id
DELETE /files/:id - Delete a file or folder by ID
get_all_files
GET /files/all - Get flat list of all files (for @filename autocomplete)
get_file_by_id
GET /files/:id - Get single file metadata
get_file_content
GET /files/:id/content - Get file content for LLM processing
get_files
GET /files - Get all files as a nested tree
resync_files
POST /files/resync - Clear database and resync from filesystem (fixes duplicates)
search_files
GET /files/search?q=… - Search files by name
sync_files
POST /files/sync - Sync filesystem with database (import existing files)
upload_file
POST /files/upload - Upload files