// NOTE: igUpload handlers are registered in the Global.asax file internal static void HandlerUploadStarting(object sender, UploadStartingEventArgs args) { Dictionary<String, Dictionary<string, string>> uploadedFiles = FileUploadController.UploadedFiles; string fileName = args.FileName; if (uploadedFiles.ContainsKey(fileName)) { Dictionary<string, string> fileInfo = null; uploadedFiles.TryGetValue(fileName, out fileInfo); args.ServerMessage = String.Format("File already exists on server: {0}, {1}, {2}", fileInfo["fileName"], fileInfo["fileSize"], fileInfo["mimeType"]); args.Cancel = true; } }
// NOTE: igUpload handlers are registered in the Global.asax file internal static void HandlerUploadStarting(object sender, UploadStartingEventArgs args) { Dictionary <String, Dictionary <string, string> > uploadedFiles = FileUploadController.UploadedFiles; string fileName = args.FileName; if (uploadedFiles.ContainsKey(fileName)) { Dictionary <string, string> fileInfo = null; uploadedFiles.TryGetValue(fileName, out fileInfo); args.ServerMessage = String.Format("File already exists on server: {0}, {1}, {2}", fileInfo["fileName"], fileInfo["fileSize"], fileInfo["mimeType"]); args.Cancel = true; } }