上传文件消除浏览器获取文件名的区别

在使用上传功能时,IEnumerable<HttpPostedFileBase> attachments 中IE会获取attachment.FileName的文件路径全名,因此,为了消除浏览器区别,

需要使用string fileName = Path.GetFileName(file.FileName);来统一获取文件的名字。

原文地址:https://www.cnblogs.com/Benjamin/p/3222315.html