Unable to upload a folder with subfolders and files using the Upload control in a Razor Page.

1 Answer 364 Views
Upload
Oscar
Top achievements
Rank 1
Oscar asked on 03 Feb 2022, 02:59 PM

Hi I am testing the Upload control using the following page: Link

I tried to drag & drop a folder with subfolders and files, but the control displays an error "File type not allowed" and it displays the main folder name.

Does the Upload control allows to drag & drop a folder with subfolders and files in it?

 

1 Answer, 1 is accepted

Sort by
0
Alexander
Telerik team
answered on 08 Feb 2022, 09:24 AM

Hi Oscar,

Thank you for the provided information and screenshot.

It is important to note, that in the Upload Overview Demo, the Upload component is configured for Asynchronous mode only, without enabling the directory upload functionality from which the following error occurs. You can verify this by clicking on the View Source tab which shows the Upload configuration used for the particular demo demonstration:

Having this in mind, we have a dedicated Directory Upload Demo that illustrates how the directory upload functionality can be utilized. In general, Telerik UI for ASP.NET Core Upload exposes built-in configurations for both the directory and directory drag and drop functionality. They can be configured through .Directory() and .DirectoryDrop() configuration API methods.

For example:

@(Html.Kendo().Upload()
    .Name("files")
    .Async(a => a
        .Save("Directory_Upload", "Upload")
        .Remove("Directory_Remove", "Upload")
        .AutoUpload(false)
    )
    .Directory(true)
    .DirectoryDrop(true)
)
 In addition, you can refer to the following articles which you might find useful:

I hope you find this helpful. If any further questions arise do not hesitate to ask.

Regards,
Alexander
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Upload
Asked by
Oscar
Top achievements
Rank 1
Answers by
Alexander
Telerik team
Share this question
or