Added code for photo upload