Last post Aug 08, 2019 07:43 PM by bruce (sqlwork.com)
Aug 08, 2019 04:58 PM|coreysan|LINK
I have a form with the following:
<input type="file" name="files" multiple class="form-control" />
I can capture the list of images like this:
var files = HttpContext.Request.Form.Files;
My question is this:
What if I have two lines:
<input type="file" name="files1" multiple class="form-control" />
<input type="file" name="files2" multiple class="form-control" />
I don't think using HttpContext.Request.Form.Files will work, because it looks to me that it returns only one list.
If I'm right, what can I do to get both lists from one form?
I'd appreciate any advice!
Aug 08, 2019 05:27 PM|mgebhard|LINK
You asked a similar question.
Simply add an IFromFile model parameter for each multiple file upload you have.
Aug 08, 2019 06:47 PM|coreysan|LINK
Fair enough!I'm a novice at interfaces, so here goes.
Question about the following:
Task CopyToAsync(Stream target, CancellationToken cancellationToken = null);
The variable "cancellationToken" is not resolved. How can I get that to resolve?
Aug 08, 2019 07:43 PM|bruce (sqlwork.com)|LINK
you should learn C#. if a parameter has a default value, you don't need to pass it, or you can pass the default value (null in this case).