Telerik Forums
UI for ASP.NET MVC Forum
4 answers
467 views

I'm implementing a file manager in an MVC site that works with files located somewhere other than the site. I have got this working fine as long as I stay in the root directory. Trying to change into another directory throws the following error in the console:

 

Error! Could not navigate to the folder at the requested path(/Message Attachments). Make sure that the parent folder of the target folder has already been loaded.

As changing directories doesn't seem to be triggering anything on the server, I'm at a loss as to how to troubleshoot this.

The code in the view is pretty much right out of the demo at this point:

@(Html.Kendo().FileManager().Name("filemanager")
    .DataSource(ds =>
        {
            ds.Read(operation => operation
            .Type(HttpVerbs.Post)
            .Action("Read", "Documents")
        );
        ds.Destroy(operation => operation
            .Type(HttpVerbs.Post)
            .Action("Destroy", "Documents")
        );
        ds.Create(operation => operation
            .Type(HttpVerbs.Post)
            .Action("Create", "Documents")
        );
        ds.Update(operation => operation
            .Type(HttpVerbs.Post)
            .Action("Update", "Documents")
        );
    })
    .UploadUrl("Upload", "Documents")
    .Toolbar(tb => tb.Items(items =>
    {
        items.Add("createFolder");
        items.Add("upload");
        items.Add("sortDirection");
        items.Add("sortField");
        items.Add("changeView");
        items.Add("spacer");
        items.Add("details");
        items.Add("search");
    }))
    .ContextMenu(context => context.Items(items =>
    {
        items.Add("rename");
        items.Add("delete");
    }))
)
Anna
Top achievements
Rank 1
Iron
Iron
Iron
 answered on 12 May 2022
1 answer
1.7K+ views

Hi,

Im using kendo MVC version 2016.3.1118.545

I want to use equal to filter on date and time column for format {MM/dd/yyyy hh:mm tt} but its not working

I have seen few solution but its only for filtering date alone.

Please provide some solution for this

Patrick | Technical Support Engineer, Senior
Telerik team
 answered on 24 Aug 2021
2 answers
716 views

I have implemented the File Manager like in the Demo and I have added the Download in the ContextMenu.

https://demos.telerik.com/aspnet-mvc/filemanager

https://docs.telerik.com/aspnet-mvc/knowledge-base/filemanager-create-download-command

so fare so good.

 

Now when I double click on a folder I get into the folder, but when I double click on a file nothing happens.

How can I implement that the file is open (downloaded) on double click?

 

In the Demo (https://demos.telerik.com/aspnet-mvc/filemanager) ist looks like the same behavior.

Raimo
Top achievements
Rank 1
Iron
 answered on 14 Jul 2021
1 answer
260 views

Hello

How can I make a $("#FileManager").data("kendoFileManager").refresh() everytime I open a folder on Kendo UI File Manager?

This is my problem:

When I browse to an empty folder, the folder gets reloaded every time I go into the folder.

When I browse to a folder that has files, the folder gets reloaded the first time and afterwards it won't reload/refresh anymore.

Practical case:

- Root
     - FolderA
          - File1
          - File2
     - FolderB

- If I go to FolderA, it will load both files
- When I drag File1 into FolderB, if I go to FolderB I will see the File1 inside
- I go back to FolderA and I drag File2 into FolderB
- If I go to FolderB I can only see File1 inside, FolderB was not reloaded when I went there again

The only 2 ways I found so far to see File2 inside of FolderB are:
- refreshing the whole page
- moving File1 again to another folder, when I do that File2 becomes visible again (a refresh is made);

The second way only happeens because I do a $("#FileManager").data("kendoFileManager").refresh(); but this only refreshes the folder I am currently at.

I would like to make a $("#FileManager").data("kendoFileManager").refresh() everytime I open a folder on Kendo UI File Manager.

Ianko
Telerik team
 answered on 27 Apr 2021
1 answer
42 views

     Is there a way to detect when multiple files were uploaded(via upload dialog or drag/drop) vs when a single file is uploaded?  We are trying to run different logic on the files depending on if it was multiple files or a single file that was uploaded.

 

Thanks,

-Carlos

Martin
Telerik team
 answered on 21 Apr 2021
1 answer
194 views

    When one file is dragged and dropped onto the control the Upload endpoint is called twice.

My control is declared as follows:

@(Html.Kendo().FileManager().Name("documentExplorer")
    .DataSource(ds =>
    {
        ds.Read(operation => operation
        .Type(HttpVerbs.Post)
        .Action("Read", "DocumentExplorer", new { groupId = ViewBag.GroupId }));
        ds.Destroy(operation => operation
            .Type(HttpVerbs.Post)
            .Action("Delete", "DocumentExplorer", new { groupId = ViewBag.GroupId }));
        ds.Create(operation => operation
            .Type(HttpVerbs.Post)
            .Action("Create", "DocumentExplorer", new { groupId = ViewBag.GroupId }));
        ds.Update(operation => operation
            .Type(HttpVerbs.Post)
            .Action("Update", "DocumentExplorer", new { groupId = ViewBag.GroupId }));
    })
    .InitialView("grid")
    .UploadUrl("Upload", "DocumentExplorer", new { groupId = ViewBag.GroupId })
    .Draggable(true)
    .Toolbar(tb => tb.Items(items =>
    {
        items.Add().Type("button").Text("").Command("NavigateToRoot").HtmlAttributes(new { title = "Go to Root" }).Icon("home");
        
    }))
    .Events(e => {
        e.Open("downloadFile");
        e.Execute("onExecute");
        e.Navigate("onNavigate");
        e.DataBinding("onDataBinding");
        e.DataBound("onDataBound");

        e.Drop("onDrop");

    })
)

 

I'm using the events mostly for troubleshooting this issue, so they just output the received event/data.  That being said, the onDrop is not being called.  Any help with figuring out why this happens will be greatly appreciated.

 

Thanks,

-Carlos

Aleksandar
Telerik team
 answered on 20 Apr 2021
1 answer
53 views

Hi,

i was working on MVC project and rendered the filemanager in view with helpers.

after first loading the filemanager i did select a file and using "getSelected()" method, it returns an array of "FileManagerEntry" for each selected file.

when you load the second time it shows no files selected and in this case when i call the same "getSelected()" method, still it returns  1 record. i was expecting to be 0.  can you please let me know what would be the issue.

 

Thanks

Regards

Hassan.

Aleksandar
Telerik team
 answered on 14 Apr 2021
2 answers
72 views

I have an MVC application running on the C: drive of my web server.  I need to access files on the same machine, but a different drive, located at D:\Files.

I can't find an example of how this is accomplished.  The FileManager demo uses the application content folder for file storage, so that is not much help in this instance.  I've searched this forum, google and SO but I can't find a working example of how this is accomplished.  Most of the answers I've found simply point back to the FileManger demo without any explanation.

I would certainly appreciate any insight you can provide for this topic.

Thanks!

Jason
Top achievements
Rank 1
 answered on 23 Mar 2021
1 answer
394 views

I have a use case in which I have the user uploading a file to a memory stream via Kendo Uploader. From there, information is extracted from the file and recorded in the database. 

What I'd like to be able to do is enable the user to use something like the FileManager to navigate to a folder either on their local hard drive or a UNC path to a network share and select each of the files to be processed. I would like to have each of the files in turn uploaded and processed as described in the first paragraph. I know I can accomplish that with the Uploader. However, what I'd also like to do subsequently is after the file is processed, move the process file from the local drive folder or network share to a folder within the source folder as a way of letting the user know the file has been processed and should not be selected again.

Can I 1) act on selected local/client-side files, 2) move client-side files to a location w/in the client-side directory? If so, can you provide an example or link to documentation of how to do this?

Patrick

Ivan Danchev
Telerik team
 answered on 12 Mar 2021
3 answers
379 views

Using FileManager in our app, and we are seeing the following exception when trying to create a "New Folder".   We do not see this error with any other operations, and are able to upload, rename, & delete files/folders without issue.   Is this a binding issue with our resulting json (see below)?  The funny thing is that this exception does not occur every time we click the "New Folder" button.  It shows up maybe 75% of the time. 

 

The exception is:

VM8695:3 Uncaught ReferenceError: extension is not defined
    at eval (eval at compile (kendo.all.js:234), <anonymous>:3:164)
    at init.refresh (kendo.all.js:70463)
    at init.proxy (jquery-3.1.1.js:502)
    at init.trigger (kendo.all.js:164)
    at init._process (kendo.all.js:7940)
    at init._change (kendo.all.js:7889)
    at init.proxy (jquery-3.1.1.js:502)
    at init.trigger (kendo.all.js:164)
    at init.splice (kendo.all.js:5008)
    at init.insert (kendo.all.js:7078)

 

 

Our FileManager datasource is a configured like this...

dataSource: {
    schema: kendo.data.schemas.filemanager,
    transport: {
        read: {
            url: "MyController/GetObjects/",
            method: "POST"
        },
        create: {
            url: "MyController/CreateObject/",
            method: "POST"
        },
        update: {
            url: "MyController/UpdateObject/",
            method: "POST"
        },
        destroy: {
            url: "MyController/DestroyObject/",
            method: "POST"
        },
    },
},

 

 

Our controllers method for CreateObject is:

[HttpPost]
public ActionResult CreateObject(string target)
{
    var result = myService.CreateFolder("NewFolder", target);
    return Json(result, JsonRequestBehavior.AllowGet);
}

 

 

And the json results are:

{
    "SId": "<guid>",
    "ObjectType": "Folder",
    "IsDirectory": true,
    "HasDirectories": false,
    "RootPath": "<some stuff>",
    "NameSpace": "<some stuff>",
    "Path": "myDir\\NewFolder",
    "Name": "NewFolder",
    "Extension": "",
    "Size": 0,
    "PathLocator": "<some stuff>",
    "ParentPathLocator": "<some stuff>",
    "Created": "\/Date(1593736985477)\/",
    "CreatedUtc": "\/Date(-62135571600000)\/",
    "Modified": "\/Date(1593736985477)\/",
    "ModifiedUtc": "\/Date(-62135571600000)\/",
    "Content": null
}

 

 

Thanks for any advice.

 

Doran

Ivan Danchev
Telerik team
 answered on 08 Feb 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?