文件上传检测

This commit is contained in:
Ted 2025-02-21 08:18:43 +08:00
parent 54e401abd5
commit 3f99e42fc0
2 changed files with 2 additions and 1 deletions

View File

@ -1573,6 +1573,7 @@ function _Chat() {
const imagesData: string[] = []; const imagesData: string[] = [];
for (let i = 0; i < files.length; i++) { for (let i = 0; i < files.length; i++) {
const file = event.target.files[i]; const file = event.target.files[i];
console.log("file", file);
uploadImageRemote(file) uploadImageRemote(file)
.then((dataUrl) => { .then((dataUrl) => {
imagesData.push(dataUrl); imagesData.push(dataUrl);

View File

@ -138,7 +138,7 @@ export function uploadImage(file: Blob): Promise<string> {
}) })
.then((res) => res.json()) .then((res) => res.json())
.then((res) => { .then((res) => {
// console.log("res", res); console.log("upload res", res);
if (res?.code == 0 && res?.data) { if (res?.code == 0 && res?.data) {
return res?.data; return res?.data;
} }