internal static string FCKAddTempUploads(string domain, string filename, string itemID) { var isEdit = !String.IsNullOrEmpty(itemID); string folderID; if (isEdit) { folderID = FCKUploadsDBManager.GetFolderID(domain, itemID); if (String.IsNullOrEmpty(folderID)) { folderID = GetCurrentFolderID(domain); } } else { folderID = GetCurrentFolderID(domain); } var session = HttpContext.Current.Session; var uploads = session["tempFCKUploads"] as List <FCKTempUploadsInfo>; if (uploads == null) { uploads = new List <FCKTempUploadsInfo>(); session["tempFCKUploads"] = uploads; } var tempInfo = uploads.Find(u => String.Equals(u.FolderID, folderID, StringComparison.InvariantCultureIgnoreCase) && String.Equals(u.StoreDomain, domain, StringComparison.InvariantCultureIgnoreCase) && u.IsEdit == isEdit); if (tempInfo == null) { tempInfo = new FCKTempUploadsInfo { FolderID = folderID, StoreDomain = domain, IsEdit = isEdit, TenantID = TenantProvider.CurrentTenantID }; uploads.Add(tempInfo); } tempInfo.Files.Add(filename); session["tempFCKUploads"] = uploads; return(folderID); }
internal static string FCKAddTempUploads(string domain, string filename, string itemID) { var isEdit = !String.IsNullOrEmpty(itemID); string folderID; if (isEdit) { folderID = FCKUploadsDBManager.GetFolderID(domain, itemID); if (String.IsNullOrEmpty(folderID)) folderID = GetCurrentFolderID(domain); } else folderID = GetCurrentFolderID(domain); var session = HttpContext.Current.Session; var uploads = session["tempFCKUploads"] as List<FCKTempUploadsInfo>; if (uploads == null) { uploads = new List<FCKTempUploadsInfo>(); session["tempFCKUploads"] = uploads; } var tempInfo = uploads.Find(u => String.Equals(u.FolderID, folderID, StringComparison.InvariantCultureIgnoreCase) && String.Equals(u.StoreDomain, domain, StringComparison.InvariantCultureIgnoreCase) && u.IsEdit == isEdit); if (tempInfo == null) { tempInfo = new FCKTempUploadsInfo { FolderID = folderID, StoreDomain = domain, IsEdit = isEdit, TenantID = TenantProvider.CurrentTenantID }; uploads.Add(tempInfo); } tempInfo.Files.Add(filename); return folderID; }