How to upload a file using java script?

I need to upload a file to the tomcat server from my html page, how can I do this?
Basically give me a clean and simple idea and some samples?
I searched a lot, but I can’t understand that this is completely new to me, I am a bb application developer.

To determine the form of the used type of input type = file and button

I do not understand how to start with functionality. Has anyone helped me?

+4
source share
1 answer

You cannot use js to download anything. You send the file to a php script that saves it.

Check this.

http://www.tizag.com/phpT/fileupload.php

+2
source

Source: https://habr.com/ru/post/1393959/


All Articles