For example, logging the file name or displaying in UI (Razor automatically HTML encodes output). Can you actually provide me any link on your suggestion that I can follow. To have a full idea about the authentication and authorization, please take a look at my tutorial Apply JWT Access Tokens and Refresh Tokens in ASP.NET Core Web API 6. For an example of a Razor component that sends a file to a server or service, see the following sections: IBrowserFile returns metadata exposed by the browser as properties. ASP.NET Core 3.1 Because the action method processes the uploaded data directly, form model binding is disabled by another custom filter. Uploading malicious code to a system is frequently the first step to executing code that can: For information on reducing the attack surface area when accepting files from users, see the following resources: For more information on implementing security measures, including examples from the sample app, see the Validation section. We will add the required controller with the required ViewModel that takes the file as input and saves it to the local folder. In addition to the local file system, files can be saved to a network share or to a file storage service, such as Azure Blob storage. When displaying or logging, HTML encode the file name. Streaming doesn't improve performance significantly. Encapsulation Security Compromise networks and servers in other ways. Are you asking whether you need a ViewModel to store outside of the Project Directory? 0 open issues. public class UserDataModel { [Required] public int Id { get; set; } [Required] public string Name { get; set; } [Required] public string About { get; set; } [Required] public IFormFile ProfileImage { get; set; } } Then post the form to the API URL. If this attribute isn't set on the