Skip to content

Instantly share code, notes, and snippets.

@dyagzy
Created October 16, 2021 01:11
Action methods to expose our Api, and to handle request and response queries.
public IActionResult Upload()
{
var model = new UploadImageModel();
return View(model);
}
[HttpPost]
public async Task< IActionResult> UploadNewImage(UploadImageModel model)
{
await _imageUpload.UploadPicture(model);
return RedirectToAction("Index", "Gallery");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment