title: How to delete a file from firebase storage using JavaScript
body: <p>Hi I want to delete a file from firebase storage. My storage hierarchy is simple and looks like this. 
  <a href="https://i.stack.imgur.com/73VzG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/73VzG.png" alt="Storage hierarchy"></a></p>
  
  <p>I searched for the method on how to delete file from firebase storage i found this. </p>
  
  <pre><code>function deletingFile(fileName, file, b ) {
  // Create a reference to the file to delete
  // const storageRef = firebase.storage().ref();
  var desertRef = firebase.storage().ref().child(fileName);
  
  // Delete the file
  desertRef.delete().then(function () {
  alert('file deleted successfully');
  
   var delImg = firebase.database().ref('students').child(abc).once('value')
    .then(function (data) {
      data.val().file.set() = {};
    })
  
   $(b).parents('tr').remove();
  
       // File deleted successfully
   }).catch(function (error) {
          alert(error)
      // Uh-oh, an error occurred!
   });
  } // function deleting file ended here
  </code></pre>
  
  <p>Now when I am calling this function the following error is obtained, I am unable to resolve what is wrong here. fileName == 'DailyEase Color Theme.txt'</p>
  
  <p><a href="https://i.stack.imgur.com/oXNzK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oXNzK.png" alt="Error on calling this function"></a></p>