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

Searching S3 with the Telerik S3 FileBrowserContentProvider

3 Answers 52 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Roger
Top achievements
Rank 1
Roger asked on 23 Apr 2013, 04:46 PM
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!

3 Answers, 1 is accepted

Sort by
0
Peter Karcol
Top achievements
Rank 1
answered on 24 Apr 2013, 03:56 PM
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
0
Vessy
Telerik team
answered on 26 Apr 2013, 02:29 PM
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.
0
Vessy
Telerik team
answered on 26 Apr 2013, 02:35 PM
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.
Tags
FileExplorer
Asked by
Roger
Top achievements
Rank 1
Answers by
Peter Karcol
Top achievements
Rank 1
Vessy
Telerik team
Share this question
or