Please also check this amazing solution in below link (section "Using a static MIME Type Map"):
https://www.ryadel.com/en/get-file-content-mime-type-from-extension-asp-net-mvc-core/
You can simply use it like that:
var mineType=
MimeTypeMap.GetMimeType(System.IO.Path.GetExtension(submitted));