Tracking file storage
hey guys, is there a way in convex, that helps me retrieve remaining File storage?
i have to implement a feature similar to this -
10 mb of 1 gb used
or something like that1 Reply
Presumably you'd want this scope to some user's data. You can get the size of any stored file from the metadata:
https://docs.convex.dev/file-storage/file-metadata
Then you can sum those up.
Or you could "denormalize" and keep a total running sum of the files.
There is no API for "what's the total size of all files in my Convex storage".
Accessing File Metadata | Convex Developer Hub
Every stored file is reflected as a document in the "_storage" system table.