Added code to send photo to server