I'm using the .listFiles method to obtain my files. But how should the format on the second argument (queries) be?
TypeScript
const result = await storage.listFiles(
'bucketID', // bucketId
[{
name: 'filename'
}]
);
Link: https://appwrite.io/docs/references/cloud/client-web/storage
TL;DR
To query `storage.listFiles()`, developers should use `Query.contains` instead of `Query.contain`. The correct format for the second argument is an array of objects with key-value pairs for the query parameters. Check the documentation pages for more information: <https://appwrite.io/docs/products/databases/queries> and <https://appwrite.io/docs/references/cloud/client-web/storage>.Storage - How to query <storage>.listFiles()
I tried
TypeScript
const result = await storage.listFiles(
'bucketId',
[
Query.contain("name", "file")
],
);
But it says that contain doesn't exist on type Query, but on this page it does: https://appwrite.io/docs/products/databases/queries
Try contains
Recommended threads
- Custom API domain is unreachable
Earlier my custom api domain was working fine. Now it seems to be offline without a trace a few hours later. I didn't change anything, all the relevant DNS reco...
- "Invalid console fingerprint" when unpau...
I've tried logging out and logging back in, still can't figure out why this is happening.
- Inviting members while SMTP is disabled ...
Issue: https://github.com/appwrite/console/issues/3125 PR: https://github.com/appwrite/console/pull/3126