Got things to somewhat work, even though the upload is executed immediately instead of with UI