PIM-2135 Handle media with mongo db