Given the set of uploaded files in Request.Files , how do I find out which form field generated which file?
I have a general form mailbox that publishes various forms. This file generates an email of the name / value pairs contained in the form message. I am trying to add support for downloaded files in such a way that the name of the file upload element and the name that the file was saved as are shown in the table of the name / value pairs.
However, I cannot figure out how to relate this information together. HttpPostedFile does not contain any information about the HTTP request (for example, what field name was used), and Request.Form does not contain records for uploaded files.
Therefore, when I can easily upload files, I have no easy way to generate an email message: "This downloaded file was for this field, and this downloaded file was for this field."
source share