fix media creation/patching in edit_contacts JS