fix: 修复文件上传bug
This commit is contained in:
parent
2bf5b1c2b1
commit
99e49d7150
@ -244,15 +244,10 @@ const next = async (formEl: FormInstance | undefined, isTemporary?: any, isSave:
|
||||
const curr: any = {};
|
||||
|
||||
curr.createTime = file.response?.createTime;
|
||||
curr.extendName = file.response?.ext;
|
||||
|
||||
// TODO: 上传文件后, 后端返回两个 name 字段, 一个后端存储的 filename, 一个文件本身的 originalFilename
|
||||
curr.fileName = file.response?.originalFilename;
|
||||
// curr.fileName = file.response?.filename;
|
||||
|
||||
// curr.fileId = file.response && +file.response.id;
|
||||
curr.fileSize = `${file.response?.size || ""}`;
|
||||
curr.fileUrl = file.response?.url;
|
||||
curr.extendName = file.response?.ext || file.response.extendName;
|
||||
curr.fileName = file.response?.originalFilename || file.response.fileName;
|
||||
curr.fileSize = `${file.response?.size || file.response?.fileSize}`;
|
||||
curr.fileUrl = file.response?.url || file.response?.fileUrl;
|
||||
|
||||
curr.label = item.dictValue;
|
||||
curr.fileType = 11;
|
||||
@ -311,6 +306,7 @@ onMounted(async () => {
|
||||
response: { ...curr, contentType: "image/png" }
|
||||
});
|
||||
});
|
||||
console.info(files, "files", currFiles);
|
||||
|
||||
item.files = files;
|
||||
});
|
||||
|
||||
@ -224,15 +224,10 @@ const next = async (formEl: FormInstance | undefined, isTemporary?: any, isSave:
|
||||
const curr: any = {};
|
||||
|
||||
curr.createTime = file.response?.createTime;
|
||||
curr.extendName = file.response?.ext;
|
||||
|
||||
// TODO: 上传文件后, 后端返回两个 name 字段, 一个后端存储的 filename, 一个文件本身的 originalFilename
|
||||
curr.fileName = file.response?.originalFilename;
|
||||
// curr.fileName = file.response?.filename;
|
||||
|
||||
// curr.fileId = file.response && +file.response.id;
|
||||
curr.fileSize = `${file.response?.size || ""}`;
|
||||
curr.fileUrl = file.response?.url;
|
||||
curr.extendName = file.response?.ext || file.response.extendName;
|
||||
curr.fileName = file.response?.originalFilename || file.response.fileName;
|
||||
curr.fileSize = `${file.response?.size || file.response?.fileSize}`;
|
||||
curr.fileUrl = file.response?.url || file.response?.fileUrl;
|
||||
|
||||
curr.label = item.dictValue;
|
||||
curr.fileType = 12;
|
||||
|
||||
@ -264,15 +264,10 @@ const next = async (formEl: FormInstance | undefined, isTemporary?: any, isSave:
|
||||
const curr: any = {};
|
||||
|
||||
curr.createTime = file.response?.createTime;
|
||||
curr.extendName = file.response?.ext;
|
||||
|
||||
// TODO: 上传文件后, 后端返回两个 name 字段, 一个后端存储的 filename, 一个文件本身的 originalFilename
|
||||
curr.fileName = file.response?.originalFilename;
|
||||
// curr.fileName = file.response?.filename;
|
||||
|
||||
// curr.fileId = file.response && +file.response.id;
|
||||
curr.fileSize = `${file.response?.size || ""}`;
|
||||
curr.fileUrl = file.response?.url;
|
||||
curr.extendName = file.response?.ext || file.response.extendName;
|
||||
curr.fileName = file.response?.originalFilename || file.response.fileName;
|
||||
curr.fileSize = `${file.response?.size || file.response?.fileSize}`;
|
||||
curr.fileUrl = file.response?.url || file.response?.fileUrl;
|
||||
|
||||
curr.label = item.dictValue;
|
||||
curr.fileType = 13;
|
||||
|
||||
@ -185,15 +185,10 @@ const next = async (formEl: FormInstance | undefined, isTemporary?: any, isSave:
|
||||
const curr: any = {};
|
||||
|
||||
curr.createTime = file.response?.createTime;
|
||||
curr.extendName = file.response?.ext;
|
||||
|
||||
// TODO: 上传文件后, 后端返回两个 name 字段, 一个后端存储的 filename, 一个文件本身的 originalFilename
|
||||
curr.fileName = file.response?.originalFilename;
|
||||
// curr.fileName = file.response?.filename;
|
||||
|
||||
// curr.fileId = file.response && +file.response.id;
|
||||
curr.fileSize = `${file.response?.size || ""}`;
|
||||
curr.fileUrl = file.response?.url;
|
||||
curr.extendName = file.response?.ext || file.response.extendName;
|
||||
curr.fileName = file.response?.originalFilename || file.response.fileName;
|
||||
curr.fileSize = `${file.response?.size || file.response?.fileSize}`;
|
||||
curr.fileUrl = file.response?.url || file.response?.fileUrl;
|
||||
|
||||
curr.label = item.dictValue;
|
||||
curr.fileType = 14;
|
||||
|
||||
@ -213,15 +213,10 @@ const next = async (formEl: FormInstance | undefined, isTemporary?: any, isSave:
|
||||
const curr: any = {};
|
||||
|
||||
curr.createTime = file.response?.createTime;
|
||||
curr.extendName = file.response?.ext;
|
||||
|
||||
// TODO: 上传文件后, 后端返回两个 name 字段, 一个后端存储的 filename, 一个文件本身的 originalFilename
|
||||
curr.fileName = file.response?.originalFilename;
|
||||
// curr.fileName = file.response?.filename;
|
||||
|
||||
// curr.fileId = file.response && +file.response.id;
|
||||
curr.fileSize = `${file.response?.size || ""}`;
|
||||
curr.fileUrl = file.response?.url;
|
||||
curr.extendName = file.response?.ext || file.response.extendName;
|
||||
curr.fileName = file.response?.originalFilename || file.response.fileName;
|
||||
curr.fileSize = `${file.response?.size || file.response?.fileSize}`;
|
||||
curr.fileUrl = file.response?.url || file.response?.fileUrl;
|
||||
|
||||
curr.label = item.dictValue;
|
||||
curr.fileType = 15;
|
||||
|
||||
@ -210,15 +210,10 @@ const next = async (formEl: FormInstance | undefined, isTemporary?: any, isSave:
|
||||
const curr: any = {};
|
||||
|
||||
curr.createTime = file.response?.createTime;
|
||||
curr.extendName = file.response?.ext;
|
||||
|
||||
// TODO: 上传文件后, 后端返回两个 name 字段, 一个后端存储的 filename, 一个文件本身的 originalFilename
|
||||
curr.fileName = file.response?.originalFilename;
|
||||
// curr.fileName = file.response?.filename;
|
||||
|
||||
// curr.fileId = file.response && +file.response.id;
|
||||
curr.fileSize = `${file.response?.size || ""}`;
|
||||
curr.fileUrl = file.response?.url;
|
||||
curr.extendName = file.response?.ext || file.response.extendName;
|
||||
curr.fileName = file.response?.originalFilename || file.response.fileName;
|
||||
curr.fileSize = `${file.response?.size || file.response?.fileSize}`;
|
||||
curr.fileUrl = file.response?.url || file.response?.fileUrl;
|
||||
|
||||
curr.label = item.dictValue;
|
||||
curr.fileType = 16;
|
||||
|
||||
@ -194,15 +194,10 @@ const next = async (formEl: FormInstance | undefined, isTemporary?: any, isSave:
|
||||
const curr: any = {};
|
||||
|
||||
curr.createTime = file.response?.createTime;
|
||||
curr.extendName = file.response?.ext;
|
||||
|
||||
// TODO: 上传文件后, 后端返回两个 name 字段, 一个后端存储的 filename, 一个文件本身的 originalFilename
|
||||
curr.fileName = file.response?.originalFilename;
|
||||
// curr.fileName = file.response?.filename;
|
||||
|
||||
// curr.fileId = file.response && +file.response.id;
|
||||
curr.fileSize = `${file.response?.size || ""}`;
|
||||
curr.fileUrl = file.response?.url;
|
||||
curr.extendName = file.response?.ext || file.response.extendName;
|
||||
curr.fileName = file.response?.originalFilename || file.response.fileName;
|
||||
curr.fileSize = `${file.response?.size || file.response?.fileSize}`;
|
||||
curr.fileUrl = file.response?.url || file.response?.fileUrl;
|
||||
|
||||
curr.label = item.dictValue;
|
||||
curr.fileType = 17;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user