Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
148868 | Nov 6,2019 05:37 PM UTC | Nov 7,2019 10:20 AM UTC | JavaScript - EJ 2 | 1 |
![]() |
Tags: FileManager |
public PhysicalFileProvider operation;
public string basePath;
string root = "D:\\support\\controller";
public FileManagerController(IHostingEnvironment hostingEnvironment)
{
// Map the path of the files to be accessed with the host
this.basePath = hostingEnvironment.ContentRootPath;
this.operation = new PhysicalFileProvider();
// Assign the mapped path as root folder
this.operation.RootFolder(this.root);
}
|
var hostUrl = 'http://localhost:62869/';
var fileObject = new ej.filemanager.FileManager({
ajaxSettings: {
url: hostUrl + 'api/FileManager/FileOperations',
getImageUrl: hostUrl + 'api/FileManager/GetImage',
uploadUrl: hostUrl + 'api/FileManager/Upload',
downloadUrl: hostUrl + 'api/FileManager/Download'
},
view: 'Details'
});
fileObject.appendTo('#filemanager'); |
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.