submit photo function