4. In $\triangle A B C$, $A D$ and $C F$ intersect at $E$, $D$ is on $B C$, $F$ is on $A B$, and $A E \cdot B F=2 A F \cdot D E$. Then $A D$ must be ( ).
(A) the median on side $B C$
(B) the altitude on side $B C$
(C) the angle bisector of $\angle B A C$
(D) the diameter of the circumcircle of $\triangle A C F$
4. A.

As shown in Figure 2, from the given conditions, we have $\frac{A E}{E D} = \frac{2 A F}{F B}$. And $\frac{A E}{E D} = \frac{A F}{D G}$, so $\frac{D G}{F B} = \frac{1}{2}$. Also, $\frac{C D}{B C} = \frac{D G}{F B}$, which means $C D = \frac{1}{2} B C$. Therefore, $D$ is the midpoint of $B C$.