The file upload functionality will be introduced in the Posts section, where we could upload an image against a post. To start with, let's create a File type, which is inherited from IFormFile. It will be used as a base type while uploading the file content to the controller action, the following code implementation would provide support for file upload functionality:
public class File : IFormFile { public Guid Id { get; set; } public string ContentType { get; set; } string ContentDisposition { get; set; } public byte[] Content { get; set; } [NotMapped] public IHeaderDictionary Headers { get; set; } public long Length { get; set; } public string Name { get; set; } public string FileName { get; set; ...