Email - Lifecycle - Attachments

Inside my lifecycle.js it is

      .query("api::foundry-request.foundry-request")
      .findOne({ id: result.id, populate: true });
    console.log(mediaData);```

But the problem is, my attachments keep coming null. What am I missing? When I post it from the frontend, it does post into the backend of Strapi but it doesn't send us an email that we have setup in lifecycle.

<i>This topic has been created from a Discord post (1229497401342165054) to give it more visibility.
It will be on Read-Only mode here.
<a href="https://discord.com/channels/811989166782021633/1229497401342165054/1229497401342165054">Join the conversation on Discord</a></i>

I really have no clue how to handle this properly, but to use setTimeout with some reasonable delay

The problem is that the media isn’t created during lifecycle

So your need to wait for few seconds and do db.query call after