# rs-files · 大模型使用手册 你正在调用一个文件上传/下载 HTTP 服务。 Base URL: https://rs-files.owenclaw.com ## 1) 健康检查 - Method: GET - Path: /health - 用途: 判断服务是否在线 curl 示例: curl -sS https://rs-files.owenclaw.com/health ## 2) 上传文件 - Method: POST - Path: /upload - Content-Type: multipart/form-data - Field: file - 成功返回: { ok, filename, original_name, size, download_url } curl 示例: curl -sS -X POST https://rs-files.owenclaw.com/upload \ -F "file=@/path/to/file.txt" ## 3) 列出文件 - Method: GET - Path: /files - 成功返回: { ok, files: [{ filename, size, updated_at }] } curl 示例: curl -sS https://rs-files.owenclaw.com/files ## 4) 下载文件 - Method: GET - Path: /download/:filename - 说明: filename 使用上传返回的 filename 原样拼接(必要时 URL 编码) curl 示例: curl -sS "https://rs-files.owenclaw.com/download/" -o downloaded.bin ## 推荐给大模型的测试流程 1. 先请求 /health,确认 ok=true。 2. 上传一个小文本文件,记录返回中的 filename。 3. 请求 /files,确认列表中包含该 filename。 4. 下载该 filename,对比下载内容与原文件是否一致。 5. 如失败,优先检查:请求方法、multipart 字段名是否为 file、filename 是否 URL 编码。