Gah - why do we still not have Octoprint integration? It's way too simple to not have included at this point! OctoPrint API allows directly uploading a gcode file, plus you can load to print, or load AND print automatically!
I believe Cura has direct integration, Simplify3D has integration via their Export GCode where it runs any command you want - to get it to upload you use curl:
curl -k -H "X-Api-Key: APIKEYFROMOCTOPRINT" -F "select=true" -F "print=true" -F "file=@[output_filepath]" "http://192.168.1.32/api/files/local"
Select tells Octoprint to load the gcode file you just uploaded, print tells it to start printing. This should be a 10 minute hack to add this to the UI. A couple of check boxes, a couple of text boxes and a hook into the export menu. PLEASE!