Let $X,\tilde{X}$ be two smooth projective varieties over $\mathbb{C}$, and let $\pi:\tilde{X}\rightarrow X$ be a projective morphism. Let us moreover assume that there exists a smooth closed subvariety $Y\subset X$, such that $\pi$ is isomorphism outside $Y$, and $\pi^{-1}(Y)\rightarrow Y$ is a projective bundle of rank = codim($Y,X$).
I want to show that $\tilde{X}$ is indeed the blowup of $X$ along $Y$. I have seen smoething along this line mentioined in a paper. Of course, there will be a map from $\tilde{X}$ to the blowup by the universal perty of blowups, but I can't show it to be an isomorphism. I know that any projective birational morphism is a blowup along some closed subscheme, but it's not clear from the proof that the closed subscheme is indeed $Y$.
Any help would be appreciated.