.NET Core (WEB API): File type checking