Verify if file exists or not in C#

后端 未结 12 1339
名媛妹妹
名媛妹妹 2020-12-15 17:19

I am working on an application. That application should get the resume from the users, so that I need a code to verify whether a file exists or not.

I\'m using ASP.N

12条回答
  •  -上瘾入骨i
    2020-12-15 17:51

    Simple answer is that you can't - you won't be able to check a for a file on their machine from an ASP website, as to do so would be a dangerous risk for them.

    You have to give them a file upload control - and there's not much you can do with that control. For security reasons javascript can't really touch it.

    
    

    They then pick a file to upload, and you have to deal with any empty file that they might send up server side.

提交回复
热议问题