Retrieves all the media files from a channel.
Changelog
| Version | Description |
|---|---|
| 9.0.0 | Removed the fields and query parameters. |
| 0.64.0 | Change userId to user object in response |
| 0.59.0 | Added |
The userId of the authenticated user.
The authToken of the authenticated user.
The room ID. It is required if the roomName is not provided.
The room name. It is required if the roomId is not provided.
List of fields to order by, and in which direction. This is a JSON object, with properties listed in desired order, with values of 1 for ascending, or -1 for descending. For example, {"value": -1, "_id": 1}. Refer to the official documentation to learn more.
Number of items to "skip" in the query, i.e. requests return count items, skipping the first offset items. Refer to the official documentation to learn more.
Filter results by the type of file. Available options:
all: Return all file types.image: Filter by image files.video: Filter by video files.audio: Filter by audio files.text: Filter by text documents.application: Filter by other file types.
The name of the file to search for.
OK
{
"files": [
{
"_id": "651227bea2f73c7460e18c63",
"name": "Screenshot (317).png",
"size": 288727,
"type": "image/png",
"rid": "siyr2oWQJBjQjhLwr",
"userId": "rbAXPnMktTFbNpwtJ",
"store": "GridFS:Uploads",
"_updatedAt": "2023-09-26T00:37:19.598Z",
"identify": {
"format": "png",
"size": {
"width": 1920,
"height": 1080
}
},
"complete": true,
"etag": "2Q2D8hSxCdhQLzcpx",
"path": "/file-upload/651227bea2f73c7460e18c63/Screenshot%20(317).png",
"progress": 1,
"token": "da2aCAf88a",
"uploadedAt": "2023-09-26T00:37:18.168Z",
"uploading": false,
"url": "http://localhost:3000/file-upload/651227bea2f73c7460e18c63/Screenshot%20(317).png",
"typeGroup": "image",
"user": {
"_id": "rbAXPnMktTFbNpwtJ",
"username": "roxie",
"name": "test test"
}
},
{
"_id": "64b589e6aa5ad4273bfc4db6",
"name": "eicar.zip",
"size": 266,
"type": "application/x-zip-compressed",
"rid": "siyr2oWQJBjQjhLwr",
"userId": "rbAXPnMktTFbNpwtJ",
"store": "GridFS:Uploads",
"_updatedAt": "2023-07-17T18:35:18.242Z",
"complete": true,
"etag": "JYaAzzFQSnxYQ7rWW",
"path": "/file-upload/64b589e6aa5ad4273bfc4db6/eicar.zip",
"progress": 1,
"token": "7a1A38Cb5a",
"uploadedAt": "2023-07-17T18:35:18.216Z",
"uploading": false,
"url": "http://localhost:3000/file-upload/64b589e6aa5ad4273bfc4db6/eicar.zip",
"typeGroup": "application",
"user": {
"_id": "rbAXPnMktTFbNpwtJ",
"username": "roxie",
"name": "test test"
}
}
],
"count": 2,
"offset": 0,
"total": 2,
"success": true
}