-
Notifications
You must be signed in to change notification settings - Fork 1
/
ElFinderMvcController.cs
27 lines (23 loc) · 997 Bytes
/
ElFinderMvcController.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System;
using System.Collections.Generic;
using System.Web.Mvc;
namespace ElFinder.Integration
{
public abstract class ElFinderMvcController<TI, TSI> : Controller where TSI : IElFinderStoreInterface<TI>, new()
{
private readonly ElFinderController<TI, TSI> _controller;
protected ElFinderMvcController()
{
_controller = new ElFinderController<TI, TSI>();
}
public ActionResult ElFinder(ElFinderCommand cmd, int? init, int? tree, IList<TI> target, String name, IList<TI> src, IList<TI> dst, IList<TI> targets, int? cut, int? download, String type, Int32? width, Int32? height)
{
return new JsonNetResult { Data = _controller.ProcessCommand(cmd, init, tree, target, name, src, dst, targets, cut, download, type, width, height) };
}
[HttpPost]
public ActionResult ElFinder(ElFinderCommand cmd, IList<TI> target, String content)
{
return new JsonNetResult { Data = _controller.ProcessPostCommand(cmd, target, content) };
}
}
}