changed api method
added photo upload code