CP,
it's an error in the documentation.
i think you must write:
editor.AllowUpload = "true"
and not
editor.AllowUpload = true