added a "synchronous" switch to the demo
proper asynchronous upload finish handling (fixes #19)