关于博易上传文件的一个BUG
当上传同名文件的话,就把原有的给覆盖了。。。
代码有问题
修改,\admin\Pages\Add_entry.aspx
private void Upload(string virtualFolder, FileUpload control, string fileName) { string folder = Server.MapPath(virtualFolder); if (!Directory.Exists(folder)) Directory.CreateDirectory(folder); int c = 0; string savapath = folder + fileName; while (File.Exists(savapath)) { c++; savapath = folder +c+ fileName; } control.PostedFile.SaveAs(savapath); }