[Vuejs]-How to pass api response value to calling method to parent component that calls it in vue?

0👍

The solution was to use firebase storage getblob instead, that way we can avoid the entire thing with xhr. here is what I ended up doing to make it work:

import { getStorage, ref, getBlob } from "firebase/storage";

export default {
  methods: {
    getOneImage(imagePath) {
       return getBlob(ref(getStorage(), imagePath))
          .then((response)=>{
            return  URL.createObjectURL(response);
          })
          .catch(() => {
            return "/noProduct.jpg";
          })
        .finally(()=>{
        })
    }
  }
};

Leave a comment