I'm trying to find a way to implement file manager functionality in an mvc 2 application. I've looked at jquery etc for ways of doing this. I have been able to implement a simple upload/download functionality with just an input file button and so on, and I have also tried out jquery File Tree (http://abeautifulsite.net/blog/2008/03/jquery-file-tree/), but I have no idea how to connect the file tree functionality with the download, upload and delete functionality I want. Even though the file tree works, all it does if you click on a file is to show an alert with the name of the file. I don't know how to hook into this.
I would like something like the tree to the left with folders, and then the files to the right, with possibilites to select a file and then download or delete. The upload functionality I guess would be no problem, since I could just have that separate, and then reload the page so that the file tree updates. Although ideally I would have liked it to stay at the same selection.
Anyone have any ideas how to do this?
If not (or anyway) I would also very much appreciate if anyone knows of an open source file manager with these features (including upload/download/delete) in ajax/jquery or the like that is actually compatible with mvc2. The reason is I don't want to mess up the mvc application with web forms versions, which I do know of.
EDIT:
Here's the code that calls the fileTree function:
<script type="text/javascript">
$(document).ready(function () {
$('#JQueryFTD_Demo').fileTree({
script: 'Home/JqueryFileTree',
expandSpeed: 1000,
collapseSpeed: 1000,
multiFolder: true
}, function (file) {
alert(file); //This shows the name of the file if you click it
});
});
</script>
I can't read the fileTree funcion well enought to get where the file name is coming from (how it gets into the variable "file" here), and how I could hook into that to do different things with the file, such as deleting, downloading etc. Again, I'm very new to jquery so this is a bit above my head, I just need a file manager function that does these things and is compatible with the MVC way of thinking (i.e. not web forms based), so any other suggestions for "pre-baked code" would be fine, I don't have to understand it, just use it, and then I can learn jquery at my own pace :-).