diff --git a/web/client/src/sections/firmwareUpgrade/components/addFirmwareModal.jsx b/web/client/src/sections/firmwareUpgrade/components/addFirmwareModal.jsx index 20de846..c62bab2 100644 --- a/web/client/src/sections/firmwareUpgrade/components/addFirmwareModal.jsx +++ b/web/client/src/sections/firmwareUpgrade/components/addFirmwareModal.jsx @@ -29,7 +29,7 @@ const AddFirmwareModal = (props) => { },[]) // console.log('xxxx1111',recordRow) // console.log('xxxx11112',fileUrl) - + const okHandler= ()=>{ // console.log('fileObj',fileObj) api.current.validate().then(async (res)=>{ @@ -50,8 +50,9 @@ const AddFirmwareModal = (props) => { // } // dispatch(firmwareUpgrade.upgradeFirmware(query,body)).then(res=>{ // }) - const responseData=await request.get(qiniu+'/'+fileUrl).responseType('blob') + const responseData=await request.get(qiniu+'/'+fileUrl).responseType('arraybuffer') const blobData = responseData.body; + request.post(crawapi+'/firmwareupgrade') // .set('Content-Type','application/octet-stream') .attach('file',blobData,removeFlag?fileObj.name:recordRow?recordRow.firmwareName:fileObj.name)