in the development of the ElementUI+Express project, uploading pictures encountered this problem:
1ElementUI:
<el-upload action="http://localhost/goods/addNewGoodsPicture" :limit="1" :onError="uploadError" :onSuccess="uploadSuccess" list-type="picture">
<el-button size="small" type="primary"></el-button>
</el-upload>
2:
router.post("/addNewGoodsPicture", function (req, res, next) {
let newGoodsPicture = req.body.picture;
console.log("newGoodsPicture"+newGoodsPicture);
console.log("req:"+req);
})
3:
OPTIONS http://localhost/goods/addNewGoodsPicture net::ERR_CONNECTION_REFUSED
ElementUI+ExpressSF