fixed photo upload utility