Added upload support to the media-dialog.

No error handling at the moment.