There's some information that I find missing from this question that cites various commentaries debating of the brothers were responsible for selling Yosef to Egypt or not.
We do see in Miketz that Yehuda says to sell them to the Ishmaelites. In Breishit 37:28 it says that Midianites came by first, and they sell Yosef to the Yishmaelites who bring him to Egypt. Yet, in Breishit 37:36 it says that the Medanim sold him to Egypt. OK, I saw Rash"i on 37:28 that says that the brothers sold him to the Ishmaelites and there were multiple sales until he was eventually brought to Egypt.
One "problem" is that when Yosef reveals himself to his brothers, is that he says, in Breishit 45:4, "I am Yosef your brother whom you sold to Egypt."
Even according to those commentaries that say that the brothers were responsible for the sale, how does Yosef make this accusation? Yes, apparently, the brothers knew that the Ishmaelites were heading to Egypt (see end of Breishit 37:25 "...going down to Egypt".) However, of course, Yosef knew exactly how things happened, and at the end, pshat says that the Medanites wre the ones who brought him to Egypt, not the Ishamelites. So was Yosef accusing his brothers based on original thought and intention?