Skip to content
Discussion options

You must be logged in to vote

Using list with the bucket and folder path is the easist way (IF the user has access to all the files you want to total) and then sum the loop. That is just like querying the storage object table on bucket and partial path, but you maintain compatibility if things change. There is really no structure called a folder, just path names in the object table.

You could also write a function with sql to query the storage object table for the bucket and partial path and sum in sql. Then call it with an rpc call to return just the total. This is less work on client and would allow you to securely get a total of a "folder" even if the user does not have access to all the files. Of course then have …

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@JamesWong1999
Comment options

@moinism
Comment options

@lukechinworth
Comment options

Answer selected by JamesWong1999
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants