HttpPostedFileBase.SaveAs method question

前端 未结 2 1533
深忆病人
深忆病人 2021-02-07 00:00

I\'ve got an asp.net mvc application that uploads a file and stores them in one of the directories where the website is located.

My question is... When you execute Http

2条回答
  •  醉话见心
    2021-02-07 00:36

    HttpPostedFileBase is just an abstract base class - what SaveAs does depends on the implementation. However, it's clearly meant to abstract HttpPostedFile, and that will overwrite any files at the target location - if it can (i.e. has the appropriate permissions).

提交回复
热议问题