updated pet populator controller to run select against the database BEFORE uploading images