title: firebase storage always return Promise
body: <p>I have an application on vue 3. I need to get a link to a document from the repository. At the moment, I always get a promise, which is how it should be. But I should get a link to the document, but it doesn't. Why is this happening?</p>
  <pre class="lang-js prettyprint-override"><code>async FetchData({ state, commit }, to) {
    try {
      commit(&quot;setLoading&quot;, true);
      const q = query(collection(db, to));
  
      await onSnapshot(q, (querySnapshot) =&gt; {
        const data = [];
  
        querySnapshot.forEach((doc) =&gt; {
          let films = async (to) =&gt; {
            const starsRef = ref(storage, `images/${doc.id}/poster.png`);
  
            return await getDownloadURL(starsRef);
          };
  
          // const poster=`gs://cell-11ef4.appspot.com/images/${doc.id}/poster.png`
  
          let item = {
            id: doc.id,
            name: doc.data().name,
            slug: doc.data().slug,
            country: doc.data().country,
            duration: doc.data().duration,
            year: doc.data().year,
            video: doc.data().video,
            genres: doc.data().genres,
            actors: doc.data().actors,
            poster: to === &quot;films&quot; ? films() : null,
            // BipPoster: url,
          };
  
          data.push(item);
  
          // Get the download URL
        });
  
        commit(&quot;setData&quot;, { data, to });
      });
    } catch (err) {
      console.log(err);
    } finally {
      commit(&quot;setLoading&quot;, false);
    }
  }
  </code></pre>
  <pre class="lang-js prettyprint-override"><code>let url = async () =&gt; {
    let url;
    const starsRef = ref(storage, `images/${doc.id}/poster.png`);
  
    await getDownloadURL(starsRef).then((p) =&gt; {
      url = p;
    });
  
    return url;
  };
  </code></pre>
  <p>What i get</p>
  <p><a href="https://i.stack.imgur.com/FXYdI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FXYdI.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/Etf0O.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Etf0O.png" alt="enter image description here" /></a>
  <a href="https://i.stack.imgur.com/zrjn8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zrjn8.png" alt="enter image description here" /></a></p>