added code for Photo upload functionality