OctoPrint is a web interface for 3D printers, letting you manage prints and monitor progress without a constant USB connection between the printer and your computer. It is a lovely piece of software and I happily support it on Patreon.
But, for reasons I don't entirely understand and despite conversation to the contrary, uploading large files (1mb+) through the normal drag-and-drop interface routinely fails, crashing the Raspberry Pi it runs on and requiring a hard unplug-and-replug reboot.
Because I have to do that so often and can't memorize the incantation, I wrote a wrapper bash script to help. It additionally limits the bandwidth speed to avoid stalling, compresses to speed things up, and temporarily stops the OctoPrint server to free up the Pi's memory.