
I'll work on it .... Anyone interested

Err... people here are trying to give a solution that works *now* rather than sitting around waiting. You can already have it automatically upload when you save the file - no extra steps needed once you have it set up. And the setup is easy, just one line in your postprocessing commands:gruvin wrote:[rant]
Blows me away how someone can ask for a feature and a dozen or more people pop in with nonsense about how, "[you don't need it]". Folks ... if we didn't want it, we wouldn't freaking ask for it. In Slic3r for example, I click ONE BUTTON -- not even Prepare to Print then one button, then enter a name, then click save then ... *yawn* ... just ONE click -- and OctoPrint is ready to rock and roll. All this, save here, drag their, ssh and run a script (seriously?) stuff is THE WHOLE POINT. We don't want to do that. It's annoying, boring and tedious.
[/rant]
pgoth wrote:I've solved it fairly easy.. I'm running on S3D on a Mac and I am just calling a curl command as follows:Replace with your own OctoPrint API-key and hostname/IP-address and when you click on the "Save toolpaths to Disk" button it will send the gcode to OctoPrint.Code: Select all
curl -H "X-Api-Key: 185A556C8F684E20AAB85F2D867F2791" -F "select=false" -F "print=false" -F "file=@[output_filepath]" "http://192.168.2.197/api/files/local"
I've discovered a possible security issue that people should be aware of. When you use this approach to make Simplify3D send gcode files to OctoPrint, Simplify3D will embed your API key within gcode files underneath the "postProcessing" line.pgoth wrote:I've solved it fairly easy.. I'm running on S3D on a Mac and I am just calling a curl command as follows:Replace with your own OctoPrint API-key and hostname/IP-address and when you click on the "Save toolpaths to Disk" button it will send the gcode to OctoPrint.Code: Select all
curl -H "X-Api-Key: 185A556C8F684E20AAB85F2D867F2791" -F "select=false" -F "print=false" -F "file=@[output_filepath]" "http://192.168.2.197/api/files/local"
That's a good one to be aware of. Octoprint definitely isn't designed with security in mind (it's really just supposed to be local net only), but that is a pretty glaring hole. Fortunately there's an easy fix for the gcode files. Add the following to your postprocessing:centenary wrote:I've discovered a possible security issue that people should be aware of. When you use this approach to make Simplify3D send gcode files to OctoPrint, Simplify3D will embed your API key within gcode files underneath the "postProcessing" line.
Anyone with access to the OctoPrint instance can freely download the gcode file, even without logging into OctoPrint. This means that anyone with access to the OctoPrint instance can gain access to your API key. This will then give them full control over the OctoPrint instance, which can allow for malicious actions to be taken.
For most people, this won't be an issue since they keep OctoPrint isolated to their home network. But if anyone has an OctoPrint instance publicly exposed (i.e. to others on the network, to the Internet), this is something you should be aware of.