|
|
@ -50,7 +50,12 @@ namespace NFine.Web.Areas.WMS.Controllers |
|
|
|
return "只可以选择Excel(.xls .xlsx)文件";//当选择的不是Excel文件时,返回
|
|
|
|
} |
|
|
|
string filename = DateTime.Now.ToString("yyyyMMddhhmmss") + UPLoadType + IsXls; //获取Execle文件名 DateTime日期函数
|
|
|
|
string savePath = System.Web.HttpContext.Current.Server.MapPath("~\\File\\UPLoadFile\\" + filename);//Server.MapPath 获得虚拟服务器相对路径
|
|
|
|
var folder = System.Web.HttpContext.Current.Server.MapPath("~\\File\\UPLoadFile"); //Server.MapPath 获得虚拟服务器相对路径
|
|
|
|
if(!Directory.Exists(folder)) |
|
|
|
Directory.CreateDirectory(folder); |
|
|
|
string savePath = Path.Combine(folder, filename); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int iLen = hpFiles[0].ContentLength; |
|
|
|
if (Directory.Exists(savePath)) return "文件已存在"; |
|
|
|