Split 'getMediaFilenameAndMimeType' in 2 different functions.