Add upload functionality to the sample.