Good Day,
I'm Currently trying to use the File Manager Component in my Nuxt-App.
My use-case would however require to show each User a different user-specific Root Directory based on some parameters.
Say I have a structure like this:
C:/Projects/
- user1
- user1-project1
- user1-project2
- user2
- user2-project1
- user2-project2
Currently the Node Server is configured to serve C:\Projects\, so each User will see all Directories spanning out from this root.
I can set the Path of the component for User-1 to "/user1", so the component will initialize in this folder, however, this user will still see the Parent-Folder Projects
and all its sub-directories.
If I however set the Path of the Component to \user1 (notice the backslash), the Component will show C:/Projects/user1 as root, and show no Parent.
But then, the navigation will not work anymore. If I now try to open the user1-project1 Directory, the Component will not be able to find the Directory, since it tries to access C:/Projects/user1-project1 , instead of C:/Projects/user1/user1-project1 (notice how `user1` was omitted).
Would it be possible to have such a feature included, so that I either can:
The 19.2.xx Versions of File-Manager are currently not compatible with Nuxt2, which uses Vue2. hence I currently have to use 19.1.xx. Is this intended behavior?
|
beforeSend: function (args) {
var data = JSON.parse(args.ajaxSettings.data);
// Add custom parameter column
data["user_name"] = "user1\\user1-project1";
// Add custom parameter in ajax settings
args.ajaxSettings.data = JSON.stringify(data);
}, |
|
beforeImageLoad: function (args) {
// Add custom parameter in image URL
args.imageUrl = args.imageUrl + "&user_name=" + "user1\\user1-project1";
}, |
|
beforeDownload: function (args) {
// Assign your preferred root file name to the below variable and don't change other lines
var value = "user1\\user1-project1";
var includeCustomAttribute = args.data;
includeCustomAttribute.user_name = value;
args.data = includeCustomAttribute;
}, |
|
//set constant root path here
const root = "D:/Projects/";
var contentRootPath = "";
...
//Handles the GetImage request
app.get('/GetImage', function (req, res) {
//Set the location here
contentRootPath = root + req.query.user_name;
...
//Handles the Upload request
app.post('/Upload', multer(multerConfig).any('uploadFiles'), function (req, res) {
//Set the location here
var location = JSON.parse(req.body.data).name;
contentRootPath = root + location;
...
//Handles the Download request
app.post('/Download', function (req, res) {
//Set the location here
var location = JSON.parse(req.body.downloadInput).user_name;
...
//Handles the read request
app.post('/', function (req, res) {
//Set the location here
contentRootPath = root + req.body.user_name; |