Added ability to upload photos using API. Todo: write tests.