I used to convert an uploaded file to base64 string in asp.net MVC5 as below, but now not able to do the same in Asp.net Core. since it doesn't not support HttpPostedFile and the IFile also doesn't have any of those option. can someone please help me. thanks
[HttpPost]
public void Index(HttpPostedFileBase file)
{
byte[] fileByte = new byte[file.ContentLength];
file.InputStream.Read(fileByte, 0, file.ContentLength);
string base64String = Convert.ToBase64String(fileByte);
byte[] newByteFile = Convert.FromBase64String(base64String);
}