Apr 14, 2020 06:11 PM|bruce (sqlwork.com)|LINK
you are totally confused. please read a MVC file upload tutorial. it works just php other than different binding name conventions.
a form post with files is a multi-part form post. the post data looks like a standard mime message with each form field and file its own mime-part. on binding MVC adds mime-type files to file collection (Request.Files) and mime-type form fields to the forms
collection (Request.Form). these collections are then bound to the action parameters. if you named all the <input type="file" name="Files"> then they will all bind to a model parameter named "Files".
client side you control the form post of files by creating / removing <input type=file>. you can not set the filename, the user must do that via the browser file picker. you can change the name attribute, or disable or clear name the control if you don't
want it included in the post.
if you are using ajax, you can use the FormData() but, again, the user must select the file name via the dialog.