1
Good afternoon,
Can anyone tell me how to get an image on ASP.Net Core ?
I have the html page that tries to send to the server:
<form method="post" enctype="multipart/form-data" asp-controller="Produto" asp-action="ImageLoad">
<div class="form-group">
<div class="col-md-10">
<p>Upload one or more files using this form:</p>
<input type="file" name="files"/>
</div>
</div>
<div class="form-group">
<div class="col-md-10">
<input type="submit" value="Upload" />
</div>
</div>
</form>
But I don’t know how to get that image on, and save it in the bank with Entity.
I believe it’s something like :
[HttpPost]
public async Task ImageLoad(List<IFormFile> files)
{
foreach (var file in files)
{
// do something
}
Could someone help me ?
The answer worked out?
– novic