title: Access HTML element from express js
body: <p>I've created the sample app using express js to upload the file on the local path. </p>
  
  <p><strong>app.js</strong></p>
  
  <pre><code>    const express = require("express");
      const app = express();
      const http = require("http").Server(app).listen(3000);
      const upload = require("express-fileupload");
  
      app.use(upload());
  
      console.log("Server Started");
  
      app.get("/", function (req, res) {
      res.sendFile(__dirname + "/index.html");
      }
      )
  
      app.post("/", function (req, res) {
      if (req.files) {
          //console.log(req.files);
          const file = req.files.filename;
          const filename = file.name;
  
          file.mv("./upload/" + filename, function (err) {
          if (err) {
              console.log(err);
              res.send("error occured");
          }
          else {
              res.send("Done");
          }
          })
      }
      })
  </code></pre>
  
  <p><strong>index.html</strong></p>
  
  <pre><code>    &lt;div&gt;
      &lt;h1 style="align-content: center"&gt;Upload your file here!&lt;/h1&gt;
      &lt;/div&gt;
      &lt;div style=" background-color: white;
                  padding:64px;
                  display:flex;
                  align-items:flex-start;
                  justify-content: flex-start;
                  box-shadow:  0 15px 30px 0 rgba(0, 0, 0, 0.11), 0 20px 15px 0 rgba(0, 0, 0, 0.08);
                  box-sizing:border-box"&gt;
  
      &lt;form label="upload" method="post" enctype="multipart/form-data" action="/"&gt;
          &lt;label&gt; Enter reference&lt;/label&gt;
          &lt;input type="text"&gt;&lt;/input&gt;
          &lt;br&gt;&lt;br&gt;
          &lt;input type="file" name="filename"&gt;
          &lt;input type="submit" value="upload"&gt;
      &lt;/form&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>I need the help to access the text content entered on the input type = "text" from the app.js file. Any help would be appreciated.</p>