Added upload function.