prgenovese wrote:bpopp wrote:For those of you on Windows, I just built a small background application for uploading gcode and stl files from a local folder to an Octoprint server (via REST). Once configured, it watches for changes to the folder and automatically uploads any added files. Seems to be working well for me, but your mileage may vary. Would love to hear feedback at bpopp [at] bpopp [dot] net (or github) if anyone tries it out:
https://github.com/bpopp/OctoprintUploader/releases
I was so hopeful when I saw this, but unfortunately the 1.2.1 version simply doesn't work. The configuration screen confirms the connection to OctoPrint and the hot folder is all set up, but much to my chagrin it turns out to be a cold folder. Dropped files never get touched and nothing gets sent to OctoPrint.
I took a look at the source code, but unfortunately I'm not a very good C# programmer so I can't recognize the problem. The one thing the seems strange is the system timer never seems to be referenced after its initially defined as null. That seems to be related as the "hot" folder never seems to be checked, but this is just speculation on my part.
In the end, this kind of thing shouldn't even be necessary and S3D should have an official solution to this obvious need. Hopefully that is part of the major new release said to be coming soon.
Until S3D developers provide an officially supported Octoprint integration solution, what pgoth brought to the table with Curl is a real elegant and simple solution (thanks pgoth).
The other solutions offered up here work but....
- Saving across the network to, or folder syncing with, a Samba share on the Octoprint server works but requires refreshing your browser to see the newly uploaded file and without Octoprint API functionality requires additional manual intervention on the Octoprint side once you can see the file.
- bpopp's .net ClickOnce application apparently works for some (it did not for me on my Windows 10 machine) but even though it is an API connected solution, it isn't a global answer and requires a background process to constantly be running. Not a great answer, but I certainly can appreciate bpopp's attempt at sharing an answer.
The Curl approach "Simply" works (pun only slightly intended) and it works in a way an official S3D/Octoprint API solution would be expected to work. It's just missing the pretty configuration UI I would hope S3D will be offering, and it requires having Curl installed which I hope S3D will bake into their solution without requiring Curl at all.
But in the interim, it really works, is simple to set up, and in my opinion the only way to go.