HI,
I am using Kendo jQuery.
FileManager is not showing the folder names , instead it is showing as "undefined".
Version :
<!-- Kendo UI -->
<script src="~/lib/kendo-ui-2023.3.1010/js/kendo.all.min.js"></script>
<script src="~/js/kendo-ui-license.js" type="text/javascript"></script>
Visual Studio C# backend response
c# Code :
public virtual JsonResult OnPostFileManagerRead(string target)
{
try
{
........
........
var files = directoryBrowser.GetFiles(path, Filter);
var directories = directoryBrowser.GetDirectories(path);
var result = files.Concat(directories).Select(f => new
{
Name = f.Name,
Size = f.Size,
Path = VirtualizePathString(f.Path),
Extension = f.Extension,
IsDirectory = f.IsDirectory,
HasDirectories = f.HasDirectories,
Created = f.Created,
CreatedUtc = f.CreatedUtc,
Modified = f.Modified,
ModifiedUtc = f.ModifiedUtc
});
return new JsonResult(result.ToArray());
}
catch (DirectoryNotFoundException)
{
throw new Exception("File Not Found");
}
}
throw new Exception("Forbidden");
}
catch(Exception ex)
{
return new JsonResult(ex);
}
}
Query :
1. What might be the issue ?
2. How can i resolve this issue ?
Hi,
I need to send some dynamic parameters, (path and others), when uploading files from js.I am running the current version, 2023.1.425.
The control is actually first created through asp.net core MVC, however I'm using the CustomCommand method as such. Please note the window is already initialized prior to this. Upon the first use of my custom "Tags" context menu, the window opens and I'm able to carry out operations as expected. After closing the window, and attempting to open it again, I get an error in the browser console.
var filemanagerNS = kendo.ui.filemanager;
filemanagerNS.commands.MyCustomCommand = filemanagerNS.FileManagerCommand.extend({
exec: function(){
var FileIDs = Array();
var i = $('#filemanager').getKendoFileManager().getSelected();
$(i).each(function(){
if (!this.isDirectory)
FileIDs.push(this.ID);
});
if (FileIDs.length > 0) {
// we'd call up our modal here populated with some kind of tag manager
$.post( "/Tags", { "FileIDs": FileIDs }, function( data ) {
$("#frmmodal").html(data).data("kendoWindow").open();
});
}
}
});
This works the first time, but attempting to open the window again results in the following error:
Uncaught TypeError: n.filemanager.commands[t] is not a constructor
at init.executeCommand (kendo.all.js:318819:21)
at init.trigger (kendo.all.js:318819:21)
at init.action (kendo.all.js:318819:21)
at init._onSelect (kendo.all.js:318819:21)
at init.trigger (kendo.all.js:318819:21)
at init._triggerEvent (kendo.all.js:318819:21)
at init._triggerSelect (kendo.all.js:318819:21)
at init._click (kendo.all.js:318819:21)
at HTMLUListElement.dispatch (jquery.min.js:3:12445)
at r.handle (jquery.min.js:3:9174)
As a result, the component stops functioning entirely, not just the context menu -> window method that seems to be causing this.
Hi,
There is an existing issue with File Manger pagination in List Mode (Grid Mode works fine).
The issue is that the paginator does not get updated with total count of items in the folder just opened/expanded. The count remains the same as first/home page.
E.g. On home page of file manager, I have 5 items ( 3 folders, 2 files)... so pager widget reads "1 - 5 of 5 items".
Once I click on a folder (one of the 5 items), it opens to show 50 (of 25000) files. However, the paginator widget stays at "1 -5 of 5 items". Thus leaving the user screwed because there are no pager links to get to next page of items as it thinks it has only 5 items in view when there are actually 50 in view, and it thinks total items are 5 instead of 25,000.
If I switch to Grid mode, it all works perfectly. Both my list and grid views are configured exactly the same.
,
views: {
list: {
pageable: {
alwaysVisible: true,
pageSizes: [10, 20, 50, 100, 200, 300, 500, 1000]
},
pageable: true,
selectable: "single" //allows only single selection int the ListView
},
grid: {
pageable: {
alwaysVisible: true,
pageSizes: [10, 20, 50, 100, 200, 300, 500, 1000]
},
pageable: true,
selectable: "single" //allows only single selection int the ListView
}
So an obvious bug...but when will there be a fix? Or a workaround? Currently I am working on rolling my own here. I have to trap the "open" event (double click)...and the reset the datasource with the correct items for the folder clicked on, and update the datasurce totals...then it works fine...but i have lost context of parent folders by resetting the data source with items at folder level.
The way it is currently, list mode is useless in FileManager...unless your sub folders have less items than your root folder.
Hi,
I'm working with Kendo FileManager, it's nice but also pretty immature, I hope you can fix it soon.
Main problems are:
1)The copy/move option during drag and drop it's out of every standard UI, the darg/drop action moves items, eventually a copy/paste context menu allow to copy it. In your strange way a lot of duplicated files are created accidentally...
2) We have no way (or I don't find) to move a file/folder to the root. A standard strategy can be a "..." folder that refers to the parent.
3) We have no way (or I don't find) to stop client actions server side, communicating something, in ie: "I'm sorry, you can't rename this file." We can use command event but not for actions Read and Upload.
4) Upload button allow to uploads something, then if you click it a second time the File list contains informations about previuos sents and if you click "clear list" the windows is closed... terrible...
5) Commands can require long time but no busy indicators appears...
6) How to distinguish Copy from Move? The server receives the same "Create" request.
I really hope you can release a new version in a reasonable time
Thanks,
marc.
The FileManager has a toolbar with an inbuilt search text box. How can I change the filtering method from the default (seems to be "startswith") to "contains".
Thanks for any advice!
Patrick
Hello,
I am trying to use FileManager as the file manger for TinyMCE 6. I have been able to successfully get it to load in TinyMCE's windowManager dialog. All of the features of the FileManager work, except for uploading files. When I click on the Upload button, or drag and drop a file into the FileManager, nothing happens. When I view the browser console, I see a warning that says: The uploadDialog dialog is not available!
What will cause the uploadDialog to not be able to show?
I am using the FileManager in a plain .html file like so:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2022.2.621/styles/kendo.common-bootstrap.min.css" />
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2022.2.621/styles/kendo.bootstrap.min.css" />
<link href="https://cdn.kendostatic.com/2022.2.621/styles/kendo.bootstrap-main.min.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="telerik-file-manager.min.css" />
<script src="https://kendo.cdn.telerik.com/2022.2.621/js/jquery.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2022.2.621/js/kendo.all.min.js"></script>
</head>
<body>
<div id="filemanager"></div>
<script src="telerik-file-manager.min.js"></script>
</body>
</html>
The jQuery code that I'm using to initialize the FileManager is:
$('#filemanager').kendoFileManager({
initialView: 'grid',
draggable: 'true',
resizeable: 'false',
dataSource: {
schema: kendo.data.schemas.filemanager,
uploadUrl: '/api/telerik-file-manager/upload',
transport: {
read: {
url: `/api/telerik-file-manager/read?filter=${filter}`,
method: 'GET'
},
create: {
url: '/api/telerik-file-manager/create',
method: 'GET'
},
update: {
url: '/api/telerik-file-manager/update',
method: 'GET'
},
destroy: {
url: '/api/telerik-file-manager/delete',
method: 'GET'
}
}
},
contextMenu: {
items: [
{ name: "select", text: "Select File", command: "SelectFile", spriteCssClass: "k-icon k-i-hyperlink-open" },
{ name: "rename" },
{ name: "delete" },
]
}
});
I am using ASP.NET Core 6 and I have the FileManager completely working great on a Razor Page, but I can't get the Upload feature to work when loading it into a TinyMCE windowManager dialog.
Any suggestions would be appreciated.
Hi Team,
I would like to fire a validation post drag but pre-drop, this should allow me to cancel the drop and show a message to enduser explaining the cause.
the drop event only allows to modify the rendered alert dialog but it doesnt allow me to cancel the event altogether.
any help is appriciated.
Regards,
Ashutosh