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

FileSystemContentProvider - commented code

3 Answers 94 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Aleksandar
Top achievements
Rank 1
Aleksandar asked on 22 Nov 2008, 05:23 AM
Could you please post fully commented VB code for FileSystemContentProvider? At least info on what the meaning of variables like location, fullPath, selectedUrl, selectedTag, selectedItemTag and similar are. I see many questions here are about ImageBrowser and other FileBrowser controlls and FileSystemContentProvider is not documented at all. If posting the code in forums is not an option, could you please forward it to my email address?

[EDITED]:
Also, expected results for the following functions are not well explained:
-ResolveDirectory
-ResolveRootDirectoryAsTree
-ResolveRootDirectoryAsList


Regards,
Alex

3 Answers, 1 is accepted

Sort by
0
Aleksandar
Top achievements
Rank 1
answered on 24 Nov 2008, 05:19 AM
These are my suggestions for improovement of ImageBrowser (and other FileBrowser) controlls:
-Controll over "Save As" location text box content (to make it readOnly at least) in ImageEditor or replace it with two text boxes, "Folder location" and "File name", which seems more logical if custom content provides used. For example, what I get there is www.mydomain.com/ImageServer.ashx?ImageFolder=SubFolder/SubSubFolder&ImageName=ImageName.jpg .I can understand this and regex on server, but client is confused and cannot use what is there to save image to different folder. Since they do not understan this, they delete it and make confusion bigger. Then my helpdesk phones get hot. If you decide to implement two text boxes, consider DropDown as option wtih flattened folder list or treeview. At least as an option for developer.
-New folder dialog pops up script window blocked by browser (IE7). Why don't you use your own dialogs???,
-Allow for separate folder for _thumb images. I might still not understand the logic of _thumbs files, but saving them as ImageName_thumbs.jpg (I understand _thumbs can be replaced with something else) makes a mess in file system. Allow _thumb image to be able to overwrite original. At present original is in use and cannot be written over during StoreBitmap function,
-Control over whether "Image Editor" and "Upload" buttons are shown in ImageManager [EDITED - Upload can be disabled by specifying wrong UploadPath],
-Allow rename of folders and files,
-Drag'nDrop functionality for folders and files,
-Explain use of "Location", "Attributes" and "Tag" properties on client for DirectoryItem and FileItem. It seems to me that change of these have impact on browsing. I leave them blank as they cannot be used because not documented,
-Make optional for disabling browsing to Root folder. This will be very usefull with CustomContentProviders as sometimes ViewPaths have to be "/", esspecially if user's files are organised as C:\ImportantFolder\UserRootFolder\FolderUserCanView1 and C:\ImportantFolder\UserRootFolder\FolderUserCanView2. In this case user is to be able to see FolderUserCanView1 and FolderUserCanView2, but not C:\ImportantFolder\UserRootFolder. When folders FolderUserCanView1 and FolderUserCanView2 are listed, user can click on .. folder and see UserRootFolder or folder with no name. Not acceptable at all. Can supply serialised DirectoryItem with subdirectories outlining this.
-Explain what are expected returns from all functions inherited from FileBrowserContentProvider class. At present, we can just assume or waste many hours in guessing,
-Search for ImageEditor phrase returns no topics in help documentation supplied with the product. Unacceptable.

I noticed my forum posts are getting answered slower then others. Any reason for this? If I start submiting this as support requests directly to your support email, other users will not benefit at all. But if that will decrise answer time, I will have to do it that way. Please advice.


Regards,
Alex
0
Aleksandar
Top achievements
Rank 1
answered on 25 Nov 2008, 02:07 AM
Continuing monologue:
-Insert button is not required on upload page of imageManager as it only confuses user. They click Browse, choose image, then Insert instead of upload and dialog goes away. They try that several times and then pick up the phone... Cancel is the only button required and it should return user to ImageManager main window, not way back to the editor. 
Regards,
Alex
0
Lini
Telerik team
answered on 27 Nov 2008, 12:07 PM
Hi Alex,

The description of the FileBrowserContentProvider type is available in our documentation - http://www.telerik.com/help/aspnet-ajax/telerik.web.ui-telerik.web.ui.widgets.filebrowsercontentprovider_members.html.

The ResolveDirectory method is used mainly in Ajax calls when you change the current folder in the dialog. It should return a list of files in the specified path.

The ResolveRootDirectoryAsTree/ResolveRootDirectoryAsList methods are called when a file browser dialog first loads. Only one of these is invoked, depending on the display mode of the dialog. ResolveRootDirectoryAsList should return a flat list with all the folders and subfolders in the specified path. The other function - ResolveRootDirectoryAsTree, returns the files and folders in the specified path.

Thank you for your suggestions for the file manager/image editor dialogs. I have logged them in our database and we will do our best to implement as many as we can in future releases. We plan to change the current file browser dialogs to use the new RadFileExplorer control (http://demos.telerik.com/aspnet/prometheus/Editor/Examples/FileExplorer/Overview/DefaultCS.aspx). This will allow us to add file moving/renaming and drag & drop functionality.

All the best,
Lini
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Editor
Asked by
Aleksandar
Top achievements
Rank 1
Answers by
Aleksandar
Top achievements
Rank 1
Lini
Telerik team
Share this question
or