How to browse folder and display path

I would like to browse the folder and upon selecting folder i need to display that path in text box, but in asp.net core mvc i am unable to perform this action, can any one please suggest something or any alternative or sample example, it would save my lot of time as was spending lot of time to get to answer. any suggestion is highly appreciated. Thanks in advance.


1 Reply

UD UdhayaKumar Duraisamy Syncfusion Team December 2, 2024 03:51 PM UTC

To enable folder selection in the ASP.NET Core Uploader component, you can set the directoryUpload property to true. This allows users to upload files by selecting a folder, as demonstrated in the example below:


<ejs-uploader id="UploadFiles" directoryUpload="true"></ejs-uploader>

However, regarding your requirement to display the path of the selected folder in a text box, modern web browsers restrict access to the complete file path of uploaded files due to security and privacy concerns. This restriction is designed to prevent exposing sensitive information about the user's directory structure. As a result, only the file names and data can be accessed from uploaded files.

Loader.
Up arrow icon