How to go from taking in one photo upload to taking a multiple photo upload
Right now the way I'm doing it is:
public class MyViewModel{ // some things public IFormFile Photos { get; set; } // etc...}
public class MyViewModel{ // some things public IFormFile Photos { get; set; } // etc...}
and in the View I pass that ViewModel into I'm taking in the upload like this:
<form asp-action="MyAction" enctype="multipart/form-data"> Things before <div class="custom-file"> <p for="customFile">Pick an image:</p> <input asp-for="Photos" class="custom-file-input" id="customFile"> </div> Things after</form>
<form asp-action="MyAction" enctype="multipart/form-data"> Things before <div class="custom-file"> <p for="customFile">Pick an image:</p> <input asp-for="Photos" class="custom-file-input" id="customFile"> </div> Things after</form>
This only allows uploading one photo at a time. Stack Overflow tells me that the way to do multiple would be:
But since I didn't even know one can call asp classes in the html tag like that I would really appreciate some help and guidance on how to go from what I currently have to what I want to have.