Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

bulma upload file

<!-- with name setup -->
<div class="file">
  <label class="file-label">
    <input class="file-input" type="file" name="resume" onchange="showName(event)">
    <span class="file-cta">
      <span class="file-icon">
        <i class="fas fa-upload"></i>
      </span>
      <span class="file-label" id="file-name">
        Choose a file…
      </span>
    </span>
  </label>
</div>

<script>
  var fileName = document.getElementById("file-name")
  function showName(event){
	fileName.innerText = event.target.files[0].name;
  }
</script>
 
PREVIOUS NEXT
Tagged: #bulma #upload #file
ADD COMMENT
Topic
Name
4+1 =