HttpPostedFileBase.SaveAs method question

前端 未结 2 1538
深忆病人
深忆病人 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:21

    Yes. Any existing file will be overwritten. (I checked the source)

    0 讨论(0)
  • 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).

    0 讨论(0)
提交回复
热议问题