Files
Listing Files
Learn how to list files inside your Pinata account
To list the files on your account you can either use the Files SDK or the Files API to fetch file data programatically.
This will return an array of file objects
Filters
When listing files there a few ways you can filter the results
name
- Type:
string
Filter results based on name
group
- Type:
string
Filter results based on group ID
cid
- Type:
string
Filter results based on CID
mimeType
- Type:
string
Filter results based on mime type
order
- Type:
"ASC" | "DESC"
Order results either ascending or descending by created date
limit
- Type:
number
Limit the number of results
cidPending
- Type:
boolean
Filters results and only returns files where cid
is still pending
Auto Paginate (SDK)
The list
method has an auto pagination feature that is triggered when used inside a for await
iterator
Works like magic ✨