I had the same problem in my Home Assistant installation. To fix this, I created a directory titled “media” in my config folder.
For the configuration I used
homeassistant:
media_dirs:
media: /config/media
For some reason the media directory in the root folder would not work whatsoever so I had to declare it myself.