Upload updates

Build on the upgrade_to branch, which is still unmerged as well.
On Unix/Linux, this seems to defaults to /tmp. /tmp is usually deleted on every restart, though. I think it would be better if we were to default to /var/tmp on Linux.