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