@GitOverHere/

Upload File

HTML, CSS, JS

No description

fork
loading
Files
  • index.html
  • app.js
  • script.js
  • style.css
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <link rel="stylesheet" href="style.css">
  <script defer src="script.js"></script>
  <title>File Upload</title>
</head>
<body>
  <div class="container">
    <h1> File Upload </h1>
    <form action="http://localhost/uploads" method="post" onsubmit="uploadFile()">
      <div id="drop-area">
      <input type="file" id="fileInput" onchange="handleDrop(e)">
      <label for="fileInput" id="fileLabel" > 
        <h2>Drop a file here to upload!</h2>
      </label>
      </div>
        <div>
        <p class="name">name: </p>
        <p class="type">type: </p>
        <p class="size">size: </p>
        </div>
      <br>
      <button type="submit">Submit</button>
    </form>
  </div>
</body>
</html>
result
console