# Share.qiuyiwu.com API

> 快速网页分享服务。上传 HTML/CSS/JS 文件，生成可预览链接。

## 上传文件

**POST** `https://share.qiuyiwu.com/api/upload`

**Content-Type:** `multipart/form-data`

**参数：**
- `file` — 文件对象（必需）

**支持格式：** `.html` `.htm` `.css` `.js` `.json` `.svg` `.txt` `.md`

**cURL 示例：**

```bash
curl -X POST -F "file=@your_page.html" https://share.qiuyiwu.com/api/upload
```

**Python 示例：**

```python
import requests

with open("your_page.html", "rb") as f:
    r = requests.post("https://share.qiuyiwu.com/api/upload", files={"file": f})
    data = r.json()
    print(data["url"])  # https://share.qiuyiwu.com/f/a3b2c1.html
```

**成功响应：**

```json
{
  "url": "https://share.qiuyiwu.com/f/a3b2c1.html",
  "id": "a3b2c1",
  "name": "your_page.html"
}
```

**失败响应：**

```json
{
  "error": "No file provided"
}
```

## 查看文件列表

**GET** `https://share.qiuyiwu.com/api/list`

返回最近 50 个上传记录。

## 访问已上传文件

直接访问返回的 URL 即可预览：

`https://share.qiuyiwu.com/f/{id}.{ext}`

## 完整流程（3步）

1. 准备好 HTML 文件
2. POST 上传到 `https://share.qiuyiwu.com/api/upload`
3. 从响应中取 `url` 字段，分享给任何人

---

*服务地址：https://share.qiuyiwu.com*
