Okay, so what you wanna do is do a POST request.
<form method="POST" action="/addFile" enctype="multipart/form-data">
<div>
<label><h4>Name of file</h4></label>
<input type="text" name="file_name">
</div>
<div class="form-group">
<input name="photo" type="file">
</div>
<div>
<button type="submit">Submit</button>
</div>
</form>
After this, you want to catch this route with at POST request, and handle the input. You can do this in javascript or php etc.
Checkout Node.js or Laravel – im a big fan of laravel, and Laracasts has the tutorials you are asking for, for free at laracasts.com
Check this out (Laravel – PHP): https://laracasts.com/series/build-project-flyer-with-me/episodes/5
solved How to Make a HTML Form Where Files can be Submitted.\ [closed]