refactor media file response