Searching S3 with the Telerik S3 FileBrowserContentProvider

4 posts, 0 answers
  1. Roger
    Roger avatar
    5 posts
    Member since:
    Aug 2007

    Posted 23 Apr 2013 Link to this post

    Hi,

    Thanks so much for providing the S3 FileBrowserContentProvider, it made my recent switch to S3 pretty painless.  I do have one question though...Is there anyway to use the FileBrowserContentProvider to do a search or "file list" on S3?  I have been playing with the S3 API and noticed that they do not have a search method per se, but I wonder if there is anyway I could leverage your ListBucket or some other existing method to fake a search?

    In the meantime I have created a search using the AWS API for .NET but I am having trouble rebinding the results (a list of S3Objects) back to the grid.

    Any help you can provide would be appreciated.

    Thanks!
  2. Peter Karcol
    Peter Karcol avatar
    3 posts
    Member since:
    Nov 2007

    Posted 24 Apr 2013 Link to this post

    To refine this question a little bit...Is there a way to bind files to the grid that are not part of the treeview?  

    I'd prefer to use the FileBrowserContentProvider to get these results if possible, but currently I am getting the results via the AWS SDK for .NET.  I am successful in getting the results back that I expect, but can't figure out how to clear the grid and bind the results.

    Thanks
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Vessy
    Admin
    Vessy avatar
    1389 posts

    Posted 26 Apr 2013 Link to this post

    Hi Roger,

    I have already answered you other thread on the subject, but for convenience I will paste my answer here as well:

    I am afraid that since the Search functionality is not supported by the S3 API itself we cannot manipulate it externally. I could suggest you to try the following approaches to achieve a similar functionality, so you could decide whether one of them would fit your scenario:
    • You could implement a Filter field in your FileExplorer, like it is described in this live demo: Filter files and folders. The main limitation here is that it would search only among the items in the current directory.
    • You could call recursively the ResolveDirectoryAsTree() and ResolveDirectory() methods from your content provider in order to take references to all listed files and folders. Once you gather all the needed data to one place you can make a search through the items in it. Despite of the accuracy of such an implementation, note that this information-gathering would be a slow process, and you  might meet performance issues.

    All the best,
    Veselina Raykova
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  5. Vessy
    Admin
    Vessy avatar
    1389 posts

    Posted 26 Apr 2013 Link to this post

    Hi Peter,

    By design the FileExplorer control does not provide such functionality, but you could do it by using the approach described in this live demo and a KB article: Hide certain directories and files in RadFileExplorer in order to filter the folders which you do not want to be displayed.

    You have to customize it the example in it in order to hide the specific folder only in the TreeView. The ResolveDirectoryAsTree() method is called two times for each folder (once for the TreeView and once for the grid) so you could use it would be useful in for the implementation of a hide-folder-in-tree scenario.

    I hope this would be helpful.

    All the best,
    Veselina Raykova
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top