I am sending an image to my web server that I select from my HTML in the following way:
<form method="POST" action="http://'+ip+'/HelloSpringMVC/uploadFile" action="subirFoto();" enctype="multipart/form-data">
File to upload: <input type="file" name="file"><br/>
<input type="submit" value="Upload"> Press here to upload the file!
</form>
My problem is that doing this in addition to doing the POST
with the image to my web server redirects me the page to that address thing that I do not want to happen, I want to keep it in the HTML it is in, ¿ How could I solve it?
I would also like to know if this can be done in Javascript