update the smaple upload function