text: const reader = new FileReader()
  reader.onload = event => console.log(event.target.result) // desired file content
  reader.onerror = error => reject(error)
  //reader.readAsText(file) // you could also read images and other binaries
  
  document.getElementById('input-file')
    .addEventListener('change', getFile)
  
  function getFile(event) {
  	const input = event.target
    if ('files' in input && input.files.length > 0) {
  	  placeFileContent(
        document.getElementById('blogContentInput'),
        input.files[0])
    }
  }
  
  function placeFileContent(target, file) {
  	readFileContent(file).then(content => {
    	target.value = content
    }).catch(error => console.log(error))
  }
  
  function readFileContent(file) {
  	const reader = new FileReader()
    return new Promise((resolve, reject) => {
      reader.onload = event => resolve(event.target.result)
      reader.onerror = error => reject(error)
      reader.readAsText(file)
    })
  }