public bool SaveToFolder(string webFolder) { List <string> fnames = new List <string>(); List <string> diskFilenames = new List <string>(); JsonWebServerProcessor jw = _webPage as JsonWebServerProcessor; if (jw != null) { IList <IFileUploador> fileUploaders = jw.FileUploaderList; if (fileUploaders != null) { foreach (HtmlFileUpload fu in fileUploaders) { if (!string.IsNullOrEmpty(fu.Filename)) { fu.SaveToFolder(webFolder); fnames.Add(fu.FilePathSaved); diskFilenames.Add(fu.FilePathOnServer); } } } _savedFiles = fnames.ToArray(); _savedPhysicalPaths = diskFilenames.ToArray(); jw.AddUploadedFilePathes(_savedFiles); } else { _savedFiles = new string[] { }; _savedPhysicalPaths = new string[] { }; } return(true); }
public void OnRequestStart(System.Web.UI.Page webPage) { _webPage = webPage as JsonWebServerProcessor; }