Added functionality to take picture and upload to server