This is a migrated thread and some comments may be shown as answers.

Possible to show client side files and folders in TreeView?

1 Answer 127 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Marci
Top achievements
Rank 1
Marci asked on 12 Feb 2013, 07:29 PM
I've been searching without success for an example of displaying a user's local files and folders in the Kendo TreeView. Kendo's own TreeView demo fakes it by hard-coding folder and file names, but is there a way to populate it with real folders/files? A number of forum postings have mentioned that a client's file system is typically not accessed in a web application for security reasons, but I have been to plenty of sites that allow uploading of local files, so there must be a way. Does anyone have a jquery example of this? I'm writing an ASP.NET MVC application so we won't be able to access anything client-side from models or controllers, but I'm thinking a script in the view might do the trick. Any help would be appreciated!

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 14 Feb 2013, 04:39 PM
Hi Marci,

I am afraid that what you would like to achieve is not possible. Due to browser limitations and security reasons JavaScript does not have access to the local file system of the user. Uploading files is another matter. KendoUI has an uploader widget which allows you to upload file by browsing or drag'n'dropping. In this case, the user specifies which file should be opened and send to the server. There is no way to upload a random file from the users computer without his/hers knowledge.

Regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
TreeView
Asked by
Marci
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or