fixed upload demo code