Answer the question
In order to leave comments, you need to log in
Action in form Html doesn't work, what should I do?
I need to contact the server on a certain path by pressing a button, it is necessary through Action, but for some reason it does not work, requests do not go away ( I tried http://localhost:80/api/server/profile )
<form action="/profile" method="post" enctype="multipart/form-data">
<div class="mb-3">
<label for="formFile" class="form-label">Фото товара</label>
<input class="form-control adminInputPhoto" type="file" id="formFile" name="img">
</div>
<div class="mb-3">
<button type="submit" class="btn btn-primary mt-3 adminButton">Отправить</button>
</div>
</form>
router.post('/profile', (req, res) => {
res.json({mee: 'gsgsg'})
console.log("gsg")
})
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question