HELP-8330: fix the code type and fix the media_id if not a full path