Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string fileName = Path.GetFileName(entity.file.FileName).Substring(0, entity.file.FileName.Length - 4);
- string directory = Path.Combine(@"~C:UsersArturDocumentstesting" + fileName);
- fileName = Path.GetFileName(entity.file.FileName);
- Directory.CreateDirectory(HttpContext.Current.Server.MapPath(directory));
- string path = Path.Combine(HttpContext.Current.Server.MapPath(directory), fileName);
- entity.file.SaveAs(path);
- string name = Path.GetFileNameWithoutExtension(fileName);
- string myfile = name + "_" + tbl.Id + ext;
- var path = Path.Combine(Server.MapPath("~/Img"), myfile)
Add Comment
Please, Sign In to add comment