To upload photos where people appear it is very important to have permission or transfer of image rights.
If you are a company or an event organizer, you can add a clause when you sell the service with a checkbox on the web or on a physically signed paper.
If you are a freelance photographer or an agency and you are photographing in an event or establishment, you have to get a transfer of image rights to third parties. Usually the image rights are managed by the owner of the company or organizer of the event. In order to get the transfer of image rights, you must ask for permission and sign a contract with the company or event organizer.
If you are a freelance photographer or an agency and you are photographing outdoors, ask permission of the people photographed before uploading the photos, especially if the faces are clearly visible or they are minors.