You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-1Lines changed: 20 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -473,6 +473,9 @@ The SDK provides a simple interface for all the [media APIs mentioned here](http
473
473
474
474
Accepts an object of class `GetFileListRequest` specifying the parameters to be used to list and search files. All parameters specified in the [documentation here](https://docs.imagekit.io/api-reference/media-api/list-and-search-files) can be passed via their setter functions to get the results.
475
475
476
+
#### Applying Filters
477
+
Filter out the files by specifying the parameters.
478
+
476
479
```java
477
480
String[] tags =newString[3];
478
481
tags[0] ="Software";
@@ -482,7 +485,6 @@ GetFileListRequest getFileListRequest = new GetFileListRequest();
482
485
getFileListRequest.setType("file");
483
486
getFileListRequest.setSort("ASC_CREATED");
484
487
getFileListRequest.setPath("/");
485
-
getFileListRequest.setSearchQuery("createdAt >= '2d' OR size < '2mb' OR format='png'");
In addition, you can fine-tune your query by specifying various filters by generating a query string in a Lucene-like syntax and setting this generated string to the `GetFileListRequest` object using `setSearchQuery` function.
Detailed documentation can be found here for [advance search queries](https://docs.imagekit.io/api-reference/media-api/list-and-search-files#advanced-search-queries).
517
+
499
518
**2. Get File Details**
500
519
501
520
Accepts the file ID and fetches the details as per the [API documentation here](https://docs.imagekit.io/api-reference/media-api/get-file-details)
0 commit comments