Please can someone post some example code on how to hook this event "AfterFileUpload " in asp.net I want to process the file after it has been saved on the server. The docs are weak in this area I only have found the following....
The AfterFileUpload event handler should accept two arguments:
protected void MyEventHandler( object sender, CKFinder.Connector.CKFinderEventArgs args )
The AfterFileUpload event handler should accept two arguments:
protected void MyEventHandler( object sender, CKFinder.Connector.CKFinderEventArgs args )

Re: AfterFileUpload Event
Ooops it looks like we have a bug there
In Connector\CommandHandlers\FileUploadCommandHandler.cs the following line:
should be right before:
after fixing it and recompiling CKFinder, something more or less like this will work:
namespace CKFinder.Plugins { public class MyPlugin : CKFinder.CKFinderPlugin { public string JavascriptPlugins { get { return ""; } } public void Init( CKFinder.Connector.CKFinderEvent CKFinderEvent ) { // (1) Register our custom event listener CKFinderEvent.AfterFileUpload += new CKFinder.Connector.CKFinderEvent.Hook( this.MyAfterFileUploadEventHandler ); } // (2) Our event handler protected void MyAfterFileUploadEventHandler( object sender, CKFinder.Connector.CKFinderEventArgs args ) { CKFinder.Connector.FolderHandler folderHandler = (CKFinder.Connector.FolderHandler)args.data[0]; String filePath = (String)args.data[1]; String sFileName = "backup_" + System.IO.Path.GetFileName( filePath ); System.IO.File.Copy( filePath, System.IO.Path.Combine( folderHandler.ServerPath, sFileName ) ); } } }(dummy plugin that creates a duplicate of uploaded file)
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+