While this is just software and anything is possible, you will need to do the upload outside the context of the editor.
This is because the editor must already have a model to be opened against. The model may be minimal, but must at least include the model name, id and stencilset used for the editor palette as well as a blank canvas.
So, uploading in the context of the editor doesnt make any real sense.
I recommend you add the import to the container application.
Again, this is just software and it IS open source, so you can do anything you want, but the current editor is written to assume it is working on an existing model.