add function for upload photo