|
|
@ -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, |
|
|
|