HttpPostedFileBase.SaveAs方法问题 [英] HttpPostedFileBase.SaveAs method question

查看:170
本文介绍了HttpPostedFileBase.SaveAs方法问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个asp.net mvc应用程序,该应用程序上传文件并将其存储在网站所在的目录之一中.

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.

我的问题是...当执行HttpPostedFileBase.SaveAs()方法以与文件夹中现有文件名相同的名称保存它时,HttpPostedfileBase会覆盖文件吗?

My question is... When you execute HttpPostedFileBase.SaveAs() method saving it with the same name as an existing filename on the folder, does HttpPostedfileBase overwrite the file?

感谢一百万!

推荐答案

是.任何现有文件都将被覆盖. (我检查了来源)

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

这篇关于HttpPostedFileBase.SaveAs方法问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆