fix: 文件上传优化

This commit is contained in:
Gsh
2025-12-14 17:25:20 +08:00
parent 7b14fdd8de
commit da81b2d8a3
4 changed files with 207 additions and 50 deletions

View File

@@ -274,6 +274,7 @@ async function startSSE(chatContent: string) {
type: 'image_url',
image_url: {
url: fileItem.base64, // 使用base64
name: fileItem.name, // 保存图片名称
},
});
}
@@ -479,7 +480,6 @@ function handleImagePreview(url: string) {
<Document />
</el-icon>
<span class="file-name">{{ file.name }}</span>
<span class="file-size">{{ (file.size / 1024).toFixed(2) }} KB</span>
</div>
</div>
<!-- 文本内容 -->