public object FileOperations([FromBody] FEParams args) { if (args.action == "Remove" || args.action == "Rename") { if ((args.targetPath == null) && (args.path == "")) { FileManagerResponse response = new FileManagerResponse(); ErrorProperty er = new ErrorProperty { Code = "403", Message = "Restricted to modify the root folder." }; response.Error = er; return(this.operation.ToCamelCase(response)); } } switch (args.action) { case "Read": return(this.operation.ToCamelCase(this.operation.GetFiles(args.path, args.showHiddenItems))); case "Remove": return(this.operation.ToCamelCase(this.operation.Remove(args.path, args.itemNames))); case "GetDetails": return(this.operation.ToCamelCase(this.operation.GetDetails(args.path, args.itemNames))); case "CreateFolder": return(this.operation.ToCamelCase(this.operation.CreateFolder(args.path, args.name))); case "Search": return(this.operation.ToCamelCase(this.operation.Search(args.path, args.searchString, args.showHiddenItems, args.caseSensitive))); case "Rename": return(this.operation.ToCamelCase(this.operation.Rename(args.path, args.name, args.itemNewName))); } return(null); }
public IActionResult GetImage(FEParams args) { return(this.operation.GetImage(args.path, true)); }
public IActionResult Download(string downloadInput) { FEParams args = JsonConvert.DeserializeObject <FEParams>(downloadInput); return(operation.Download(args.path, args.itemNames)); }