style: 移除页面底部重复的API文档卡片
This commit is contained in:
@@ -312,64 +312,4 @@ function toggleApiPanel() {
|
||||
<button type="submit">上传</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- API文档 -->
|
||||
<div class="card mt-4">
|
||||
<div class="card-header bg-dark text-white">
|
||||
<h5 class="card-title mb-0">
|
||||
<i class="bi bi-terminal me-2"></i>临时文件上传 API
|
||||
</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<h6 class="text-muted">上传文件</h6>
|
||||
<p><strong>端点:</strong> <code>POST /api/v1/temp-upload/</code></p>
|
||||
|
||||
<h6 class="text-muted mt-3">参数</h6>
|
||||
<table class="table table-sm table-bordered">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th>参数名</th>
|
||||
<th>类型</th>
|
||||
<th>必填</th>
|
||||
<th>说明</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>title</td>
|
||||
<td>string</td>
|
||||
<td>是</td>
|
||||
<td>文件标题</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>file</td>
|
||||
<td>file</td>
|
||||
<td>是</td>
|
||||
<td>文件 (最大500MB)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>expire_type</td>
|
||||
<td>string</td>
|
||||
<td>是</td>
|
||||
<td>过期时间: expire_1h (1小时) / expire_1d (1天) / expire_7d (7天)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h6 class="text-muted mt-3">响应示例</h6>
|
||||
<pre class="bg-dark text-white p-3 rounded"><code>{
|
||||
"success": true,
|
||||
"message": "上传成功",
|
||||
"id": 1,
|
||||
"file_url": "/media/public_files/xxx.pdf",
|
||||
"file_name": "document.pdf",
|
||||
"file_size": 1048576,
|
||||
"expire_at": "2026-05-25T18:30:00Z",
|
||||
"expire_type": "expire_1d"
|
||||
}</code></pre>
|
||||
|
||||
<h6 class="text-muted mt-3">cURL 示例</h6>
|
||||
<pre class="bg-dark text-white p-3 rounded"><code>curl -X POST -F "file=@document.pdf" -F "title=测试文件" -F "expire_type=expire_1d" http://localhost:8000/api/v1/temp-upload/</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user