You are not logged in.
On my MVC application the user on client (so as webpage) must be select a folder on server. The user must browser the server folders from a specific path not from root. Then select a folder and pur it on a input form.
Any suggestion about it?
Offline
You can't browse the server but you can emulate it. Get the directories list and send them to the browser, then the browser display them as a tree for the user to select a folder.
To get the directories tree in Windows you can use something like this :
Procedure GetDirTree(SearchDir:String; RList: TStrings; SubDir:Boolean = True; Lvl:Integer= 0 );
var
Path, Tmp :String ;
SearchRec: TSearchRec;
begin
Path := CheckPathEnd(SearchDir);
if FindFirst(Path + '*', faAnyFile, SearchRec)= 0 then begin
Tmp := StringOfChar(#9, Lvl);
repeat
if ( (SearchRec.Attr and faDirectory)= faDirectory ) and (SearchRec.Name[1] <> '.') then begin
RList.Add(Tmp + SearchRec.Name);
if SubDir then GetDirTree(Path + SearchRec.Name, RList, True, Lvl+1);
end;
until (FindNext(SearchRec) <> 0);
FindClose(SearchRec.FindHandle);
end;
end;
Offline