Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
149155 | Nov 15,2019 10:39 PM UTC | Nov 20,2019 04:52 AM UTC | JavaScript - EJ 2 | 5 |
![]() |
Tags: FileManager |
let fileObject: FileManager = new FileManager({
ajaxSettings: {
url: hostUrl + "api/FileManager/FileOperations",
getImageUrl: hostUrl + "api/FileManager/GetImage",
uploadUrl: hostUrl + "api/FileManager/Upload",
downloadUrl: hostUrl + "api/FileManager/Download"
},
view: "Details",
beforeSend: function(args) {
var data = JSON.parse(args.ajaxSettings.data);
// Add custom parameter column
data["column"] = true;
// Add custom parameter in ajax settings
args.ajaxSettings.data = JSON.stringify(data);
}
});
fileObject.appendTo("#filemanager");
|
public object FileOperations([FromBody] FileManagerDirectoryContent1 args)
{
if(args.column)
{
root = "wwwroot\\Files";
}
else
{
root = "wwwroot\\Files\\Documents";
}
this.operation.RootFolder(this.basePath + "\\" + this.root);
}
public class FileManagerDirectoryContent1
{
...
...
public string TargetPath { get; set; }
public string ParentId { get; set; }
public string FilterId { get; set; }
public string FilterPath { get; set; }
public bool column { get; set; }
} |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.