Enviroment:
server,not browser;
nodejs@12.22,
"axios": "^1.7.7",
"form-data": "^4.0.0",
code:
var form = new FormData();
form.append( '/firmware.binS', , file.size );
form.append( 'myfile[]', fs.createReadStream('/firmware.bin'), '/firmware.bin' );
const config = {
headers:{
'Content-Type':'multipart/form-data',
},
}
axios.post(url,form,config)
.then((r)=>{
})
.catch((error)=>{
})
problem:
the 1st '/firmwarebinS' is right, the 2nd '/firmware.bin' had been changed to 'firmware.bin'. The '/' is lost.
Enviroment:
server,not browser;
nodejs@12.22,
"axios": "^1.7.7",
"form-data": "^4.0.0",
code:
problem:
the 1st '/firmwarebinS' is right, the 2nd '/firmware.bin' had been changed to 'firmware.bin'. The '/' is lost.