[Vuejs]-Vuejs & Firebase Storage problem. Uncaught TypeError: storage is not a function

0👍

If you are setting a storageRef as a var you will need to call .put() on that storageRef

https://firebase.google.com/docs/storage/web/upload-files#upload_from_a_blob_or_file

Using your code…

uploadImage(e){

  var file = e.target.files[0]
  var storageRef = firebase.storage().ref('products/'+file.name)
  storageRef.put(file)
}

Leave a comment