i did it in the same way as for showLoginRegisterDialog.
but for me a much nice way would be to create a own class which handles the whole upload process, what do you think?