<input type="file" id="upload">
$("#upload").change(function(e){
  var fileData = e.target.files[0]
  // console.log(fileData)
  console.log(fileData)
  console.log("name: "+fileData.name)
  console.log("size: "+fileData.size)
  console.log("type: "+fileData.type)
  
})

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js