show uploded file name input type file

PHOTO EMBED

Wed Aug 03 2022 12:38:31 GMT+0000 (UTC)

Saved by @pycajiqutu #css

  <div class="ps-4 mt-2 row">
            <div class=" col-md-6 shadow p-3 mb-5 bg-body rounded">
              <h6 class="TEXT-COLOR">Uplode Document</h6>
              <div class="d-flex gap-1 align-items-center">
                <input class="d-none" type="file" name="" id="imgInp12">
                <div class="">
                  <label class=" btn fs-small nav-btn-bg" for="imgInp12">Upload Document</label>
                </div>
                <div class="">
                  <input class=" form-control p-1" id="upfileName" readonly/>
                </div>
              </div>
            </div>
          </div>
          <script>
            imgInp12.onchange = (evt) => {
              const [file] = imgInp12.files;
              if (file) {
                upfileName.value = file.name;
              }
            };
          </script>
content_copyCOPY