How to access the Media file in api call for relation content type?

System Information
  • Strapi Version:
  • Operating System: Mac OSX
  • Database: Postgres

I have two content type one is {directors} and another is {movies}. Directors has relation with movies.

This is how the movies content type looks:

But when i try to get the request for directors with populate=* it only shows movie name and when created thing. It does not show the media files. How can i get access to the media files of movies

"data": [
    {
      "id": 1,
      "attributes": {
        "name": "Deniel Dash",
        "createdAt": "2022-07-21T06:58:50.064Z",
        "updatedAt": "2022-07-21T06:58:59.585Z",
        "publishedAt": "2022-07-21T06:58:50.712Z",
        "videos": {
          "data": [
            {
              "id": 6,
              "attributes": {
                "title": "Jhon Wick",
                "createdAt": "2022-08-17T04:14:36.445Z",
                "updatedAt": "2022-08-17T06:57:23.642Z",
                "publishedAt": "2022-08-17T04:14:37.323Z",
                "url": "182372307"
              }
            }
          ]
        }
      }
    },

No media details. Please help me with it . I am very new to strapi.

2 Likes

look at Cannot get Media of Relation using populate=* - #2 by Tenebros , i said how i resolved my problem after so many research (its highly possible you have the same problem)

2 Likes

thanks man it worked for me