Code
string uploadPath = Server.MapPath(Request.ApplicationPath + "/Upload/" + SysUser.UserName);
if (Directory.Exists(uploadPath) == false)
{
Directory.CreateDirectory(uploadPath);
}
for (int j = 0; j < Request.Files.Count; j++)
{
HttpPostedFile uploadFile = Request.Files[j];
if (uploadFile.ContentLength > 0)
{
uploadFile.SaveAs(Path.Combine(uploadPath, uploadFile.FileName));
}
}
string uploadPath = Server.MapPath(Request.ApplicationPath + "/Upload/" + SysUser.UserName);
if (Directory.Exists(uploadPath) == false)
{
Directory.CreateDirectory(uploadPath);
}
for (int j = 0; j < Request.Files.Count; j++)
{
HttpPostedFile uploadFile = Request.Files[j];
if (uploadFile.ContentLength > 0)
{
uploadFile.SaveAs(Path.Combine(uploadPath, uploadFile.FileName));
}
}