build: upload: work() cleanup function