My app uses a custom script that of course calls my WWWC exe that runs as a com object. The 'ckfinder' application comes with some sample code for .net, php, cold fusion and java. I figured i could wrap an html file ala my wwwc template around the js that launches the file manager app.
I did the following.
1) copied the ckfinder files and folders to a folder below my wwwc app content folder.
2) opened the sample html file they give you and copied the necessary pieces into my own wwwc template.
3) read the directions (wink) and adjusted the security on the server.
The part i was not sure how to deal with was session state and authentication in the .net side of things that could be
wrapped into my wwwc app.
here's the script below.
/** * This function must check the user session to be sure that he/she is * authorized to upload and access files using CKFinder. *//publicoverridebool CheckAuthentication() {// WARNING : DO NOT simply return "true". By doing so, you are allowing// "anyone" to upload and list the files in your server. You must implement// some kind of session validation here. Even something very simple as...//// return ( Session[ "IsAuthorized" ] != null && (bool)Session[ "IsAuthorized" ] == true );//// ... where Session[ "IsAuthorized" ] is set to "true" as soon as the// user logs on your system.return ( Session[ "IsAuthorized" ] != null&& (bool)Session[ "IsAuthorized" ] == true ); }
Any ideas or feedback would be mucho appreciated.