It works for me. If I insert this (with the missing parenthesis) at the top of, for example, demo/demo.js in the distribution, it replaces the ‘Image’ entry in the insert menu with an ‘Upload’ entry that logs to the console when chosen.
Are you using the git version of ProseMirror or the latest npm release? (You’re using features that only exist on git at the moment, so you need the git code.)