Add upload function.