From 6ad67428900d4111089aca8a57f1b7b2ced379b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?zhaobing=E2=80=99?= Date: Wed, 27 Dec 2023 17:11:01 +0800 Subject: [PATCH] feat:fix bugs --- .../sections/firmwareUpgrade/components/addFirmwareModal.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/client/src/sections/firmwareUpgrade/components/addFirmwareModal.jsx b/web/client/src/sections/firmwareUpgrade/components/addFirmwareModal.jsx index 30206ac..2bec96f 100644 --- a/web/client/src/sections/firmwareUpgrade/components/addFirmwareModal.jsx +++ b/web/client/src/sections/firmwareUpgrade/components/addFirmwareModal.jsx @@ -33,6 +33,7 @@ const AddFirmwareModal = (props) => { const okHandler= ()=>{ // console.log('fileObj',fileObj) api.current.validate().then(async (res)=>{ + console.log('x1112221',removeFlag,recordRow) // console.log('ressss',res) // const query = { // version:res?.versionNo, @@ -53,7 +54,7 @@ const AddFirmwareModal = (props) => { request.post(crawapi+'/firmwareupgrade') // .set('Content-Type','application/octet-stream') // .attach('file',blobData,removeFlag?fileObj.name:recordRow?recordRow.firmwareName:fileObj.name) - .field('filePath',removeFlag?`${domain}/`+fileUrl:recordRow?`${domain}/`+recordRow.filepath:`${domain}/`+fileUrl) + .field('filePath',removeFlag?`${domain}/`+fileUrl : recordRow?recordRow.filepath : `${domain}/`+fileUrl) .field('userId', userId||'') .field('firmwareName', res?.firmwareName||'') .field('comment',res?.remark||'') @@ -130,6 +131,7 @@ const AddFirmwareModal = (props) => { onSuccess={(responseBody, file,all) => { // console.log('file111',file) setFileObj(file) + console.log('x1111',responseBody?.uploaded) setFileUrl(responseBody?.uploaded) setUploadData({ name: file.name,