a demo of photo upload function