Telerik Forums
UI for ASP.NET Core Forum
1 answer
35 views
I am trying to implement paging in the ASP.Net core filemanager. Is this supported? Are there examples?
Mihaela
Telerik team
 answered on 15 Sep 2023
1 answer
115 views

We have a custom command in a UI for ASP.NET Core FileManager control that states the icon as a simple textual name which worked fine in 2023.1.117


items.Add("").Type("button").Name("refresh").Icon("reload").Text("Refresh").Click("onRefresh").HtmlAttributes(new { style = "margin-left: 5px;" });
After upgrading to 2023.2.606 the icon no longer shows so am curious how the icon should now be referenced.  I've tried using k-svg style class names but to no avail and even using SpriteCssClass with FontAwesome classes is not working.  Could the Custom Command demo for the FileManager be tweaked to show a custom command with a custom icon in the manner that is required for the new SASS + FontIcon + SvgIcon based builds of UI for ASP.NET Core.
Stoyan
Telerik team
 answered on 19 Jun 2023
1 answer
132 views
I have a request to add SharePoint document management to an existing ASP .NET Core web application and since the project already has Telerik UI in it I'd like to use the File Manager component. I can't find any samples or guidance on how I would attempt to achieve this. Is it even possible? 
Alexander
Telerik team
 answered on 23 May 2023
1 answer
70 views

Everything else within the control works, however the list view and icon view switching buttons do not. Upon clicking the list or icon view buttons as below, the error message at the bottom appears, and I have located no reason why this is the case.

 

kendo.all.js:313050  Uncaught Error: There is no  ViewComponent registered!
    at init.view (kendo.all.js:313050:21)
    at init.exec (kendo.all.js:313050:21)
    at init.executeCommand (kendo.all.js:313050:21)
    at init._toolbarClick (kendo.all.js:313050:21)
    at init.trigger (kendo.all.js:313050:21)
    at init._onSelect (kendo.all.js:313050:21)
    at init.trigger (kendo.all.js:313050:21)
    at init._select (kendo.all.js:313050:21)
    at init.trigger (kendo.all.js:313050:21)
    at init._click (kendo.all.js:313050:21)

Stoyan
Telerik team
 answered on 10 May 2023
2 answers
246 views

IHostingEnvironment used in FileManager is long obsoleted. 

Any plan to upgrade to IWebHostEnvironment soon?

thank you. 

Nicolas
Top achievements
Rank 1
Iron
 answered on 13 Jan 2023
0 answers
59 views
Is there a way to configure the FileManager so it displays files in the grid view only? I do see how to remove the option to switch between views but if I use that it only displays files in the list view.
John
Top achievements
Rank 1
 asked on 12 Dec 2022
0 answers
124 views

So, basically I do not want clients to have the options to delete or rename files which they have by default when you use FileManager through tag helper. All I need is clients to be able to view available files and download them. Is there any alternative to FileManager to achieve this feature? I greatly appreciate any help or directions. Thank you.

Edit: Using <Context-Menu> tag helper inside the filemanager component accomplished what I was looking for.

Prabhat
Top achievements
Rank 1
 updated question on 19 Nov 2021
0 answers
59 views

Request to impalement this common feature for FileManager

1) Back and Forward feature / button

2) Cut, Copy and Paste feature /Button

 
Jimmy
Top achievements
Rank 1
Iron
Veteran
 asked on 15 Oct 2021
1 answer
861 views

I have a web application that I am adding additional functions to.  The File Manager has just about everything I need (except to hide create folders).  But users have to have the ability to download files. (I kind of don't get how you can have a file manager without the ability to download files.)

Users will upload some CSV files, start a process & at end of process download log files created by the process. 

I see an example of how to extend File Manger but it just doesn't seem to fit the razor page model.  Can anyone point me towards some good examples of how to add that in?

Stoyan
Telerik team
 answered on 26 Aug 2021
1 answer
911 views

I am using the FileManager in ASP.net CORE 5 using the Tag Helpers.  I created a partial view for the FileManager and created a controller to handle the Read, Upload, Destroy, Create.... Currently the read and upload functions work as expected, but when I try to delete a file I Am getting 415 Error using this Tag:

<destroy url="/FileManagerData/Destroy" type="POST"  />

Here is the response:

{"type":"https://tools.ietf.org/html/rfc7231#section-6.5.13","title":"Unsupported Media Type","status":415,"traceId":"00-cd48a67e3165574bb55f025789ec2570-d50282d662ca804c-00"}

After some research the it appears the 415 and Unsupported Media Type is caused by not passing in the Content Type, so I changed the Tag to this:

<destroy url="/FileManagerData/Destroy" type="POST" content-type="multipart/form-data" />

This produced a 400 error with a response of:

{"errors":{"":["Failed to read the request form. Missing content-type boundary."]},"type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","title":"One or more validation errors occurred.","status":400,"traceId":"00-c95edcb44f53ca4aa80654e8ac3f4d6b-80784c169952f14a-00"}

According to you docs the content-type is application/x-www-form-urlencoded which gives me the 415 error.

 

Here is the Destroy Method from the Controller:

 

[HttpPost("Destroy")]
        public virtual ActionResult Destroy(FileManagerEntry entry)
        {
            var path = NormalizePath(entry.Path);


            if (!string.IsNullOrEmpty(path))
            {
                if (entry.IsDirectory)
                {
                    DeleteDirectory(path);
                }
                else
                {
                    DeleteFile(path);
                }

                return new JsonResult(new object[0]);
            }
            throw new Exception("File Not Found");
        }

 

What am I missing here to get this to work?

 

[UPDATE]

 

I Change the Destroy Method in the controller to this:

 public virtual ActionResult Destroy([FromForm] FileManagerEntry entry)

Added [FromForm] Which now produces the following validation errors:

 

{"errors":{"Created":["The value 'Mon Aug 16 2021 10:06:38 GMT-0500 (Colombia Standard Time)' is not valid for Created."],"Modified":["The value 'Mon Aug 16 2021 10:06:38 GMT-0500 (Colombia Standard Time)' is not valid for Modified."],"CreatedUtc":["The value 'Mon Aug 16 2021 10:06:38 GMT-0500 (Colombia Standard Time)' is not valid for CreatedUtc."],"ModifiedUtc":["The value 'Mon Aug 16 2021 10:06:38 GMT-0500 (Colombia Standard Time)' is not valid for ModifiedUtc."]},"type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","title":"One or more validation errors occurred.","status":400,"traceId":"00-5bc6f05eed3360458a9c5f37a37c8f11-27e6c765b081e642-00"}

[UPDATE 1]

I Created my own Model to replace the FileManagerEntry but set all the DateTime Fields to Strings:

       

public class FileDataJTE
    {

        public string Name { get; set; }
        public string Path { get; set; }
        public string Extension { get; set; }
        public bool IsDirectory { get; set; }
        public bool HasDirectories { get; set; }
        public string Created { get; set; }
        public string CreatedUtc { get; set; }
        public string Modified { get; set; }
        public string ModifiedUtc { get; set; }


    }

Then I Had to pass that in to the Method and convert and string ie Create, back to DateTime:

[HttpPost("Destroy")]
        public virtual ActionResult Destroy([FromForm] FileDataJTE entry)
        {
            string timeZone;

            if (TimeZoneInfo.Local.IsDaylightSavingTime(DateTime.Now))
            {

                timeZone = TimeZoneInfo.Local.DaylightName;

            }
            else
            {

                timeZone = TimeZoneInfo.Local.StandardName;

            }

            var created = DateTime.ParseExact(entry.Created, "ddd MMM dd yyyy HH:mm:ss 'GMT'K '(" + timeZone + ")'", CultureInfo.InvariantCulture);

 

Why does this not work with the FileManagerEntry on a Controller?

Any ideas on this or am I even on the right track to get this working?

Thanks

 

--R

 

Patrick | Technical Support Engineer, Senior
Telerik team
 answered on 18 Aug 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?