Added uploading code.