added uploadPhoto instance method