Browse Source

feat:fix bugs

dev
zhaobing’ 1 year ago
parent
commit
10ff3ad413
  1. 3
      web/client/src/sections/firmwareUpgrade/components/addFirmwareModal.jsx

3
web/client/src/sections/firmwareUpgrade/components/addFirmwareModal.jsx

@ -50,8 +50,9 @@ const AddFirmwareModal = (props) => {
// } // }
// dispatch(firmwareUpgrade.upgradeFirmware(query,body)).then(res=>{ // 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; const blobData = responseData.body;
request.post(crawapi+'/firmwareupgrade') request.post(crawapi+'/firmwareupgrade')
// .set('Content-Type','application/octet-stream') // .set('Content-Type','application/octet-stream')
.attach('file',blobData,removeFlag?fileObj.name:recordRow?recordRow.firmwareName:fileObj.name) .attach('file',blobData,removeFlag?fileObj.name:recordRow?recordRow.firmwareName:fileObj.name)

Loading…
Cancel
Save