validate photo upload type and size