阅读背景:

在MVC中处理多个文件上传 - 我如何知道哪个文件是哪个?

来源:互联网 

I have a form in my MVC 3 application that allows the user to optionally upload 2 files (or one or the other) and am looking for a way to tell which file is which if only one of the two files is uploaded (e.g. extracting the element ID from the input). The files serve very different purposes and will be saved to different folders on the server. Both files could potentially be the same file type (Word, PDF, etc), so file extension would not be a reliable way to tell them apart. Is there a way this can be done without making the user give the files a certain filename or something unreliable like that? Here is an example of what I'm trying to do (I know my if statements are not proper syntax. They are just to clarify what I want to do). Thanks everyone!I have a form in my MVC 3 application that allo




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: