Skip to content

Latest commit

 

History

History
21 lines (17 loc) · 348 Bytes

files.md

File metadata and controls

21 lines (17 loc) · 348 Bytes

The FormFilesContainer class allows file uploads:

public async Task<IActionResult> PostEdit(
  Product product, 
  FormFilesContainer files) 
{
  // Access uploaded files
  foreach(var file in files.Files) {
    // save file
  }
}

On the view, use:

<form asp-action="PostEdit" enctype="multipart/form-data">

</form>