I have a POST controller action like:
if (ModelState.IsValid)
{
try
{
//.. save and redirect code here
}
catch
{
//.. add errors to model state
}
}
return View(myModel);
My request.files can contain 2 images from tags like:
<input id="MyImage" name="MyImage" type="file" />
This works fine when the model is valid, the save completes and I then re-direct.
However my problem comes when the model isn't valid and I return my object to the view. The request no longer has the files in Request.Files. is there a way to pass them down to the view to be stored in the input tag?