I am heading towards running out of free space in my upload folder.
I am running a tiny print-farm and found convenient to send all of my g-code files to all of my printers thru watched folder, then choose which one prints which files. Thus hundreds of files uploaded, not all of them printed and not all of them successfully.
My goal is to clean up the folder once in a while to re-upload what is outstanding to be printed.
Clicking a delete button in the UI is painful and almost impossible at this point.
Assuming that the upload folder is being indexed somehow, what is the proper way to delete all the files in the upload folder?
maybe I could set-up Samba permissions to these folders, map them to my PC like I did with watched folder?
maybe someone could write a handy wizard plugin?
maybe there is an event command which could do it from within the UI of octoprint.
any advises are welcome, with as much info as the newbee needs.
make a system command that executes rm -rf /home/pi/.octoprint/uploads/* in the system menu, call it "Purge Uploads", whack a tick in that confirmation box and you're laughing.
I used the system command editor to make adding it easier (and the confirmation check box probably only makes sense if you are using this plugin): System Command Editor
This sounds like another cool solution, could you please write up more? Although sometimes these batches of prints go by the hours, and sometimes by weeks.
Thanks! Good to know that this is possible. maybe would find a need to impement something like this at some other need. so it stays untested by me at this point. also ssh into every machine of the farm sounds like a lot of one to one attention.
Weird, I could have sworn that's what my purge command was. I'll see if it still works / whether that is what I had. I may have actually told octoprint to execute some sort of script in my home dir like "purge.sh" or something, with that command in it.
Will get back to you
edit: This command works for me rm -rf /home/mint/.octoprint/uploads/* ; rm /home/mint/.octoprint/uploads/.metadata.yaml
Obvoiusly my user name is mint and not pi. Just removing * doesn't seem to remove the metadata file so I added that in to specifically remove it too.
rm -rf /home/pi/.octoprint/uploads/* ; rm /home/pi/.octoprint/uploads/.metadata.yaml
doesnt work, and this is the only line in the log:
2018-04-12 10:56:19,823 - tornado.access - WARNING - 404 POST /api/system/commands/custom/ (127.0.0.1) 54.33ms octoprint.log (90.9 KB)
That's really weird, I'm using it on a custom install so maybe my permissions are slightly different. I'll see if I can dig up a spare SD card and install octopi on it and see if it still works there (maybe of note, I've usually always used a custom install so perhaps something is slightly different to my environment).
Just downloaded the prusa print version and it works just fine for me. Make sure you fill out all the fields in the system command editor to match what I have. I noticed you have no "action" and nothing for the message, try filling those out.