Added logic to store photos online