Mid
ASP.NET Core
ASP.NET Core
Binding of files (IFormFile)?
Used for file uploads from forms (not [FromBody]):
public IActionResult Upload(IFormFile file)
{
var path = Path.Combine("uploads", file.FileName);
using var stream = new FileStream(path, FileMode.Create);
file.CopyTo(stream);
}
📝 For multiple files:
List<IFormFile> files
Configuration & AppSettings
Share this Q&A
Share preview image: https://www.toolliyo.com/images/toolliyo-logo.png