I create this tutorial referring to documentation OWAPS, in general you can implement this pattern with other programming languages.
restuwahyu13/securing-file-upload
Tips & Trick for securing file upload preventing file injection attacks.
TypeScript