Add the upload function.