Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix getAllItemsAlongFolder

Inian25e3466412df
diff --git a/studio/localStores/storageExplorer/StorageExplorerStore.js b/studio/localStores/storageExplorer/StorageExplorerStore.js
index 5d2f4b01dbd..7199b3a3719 100644
--- a/studio/localStores/storageExplorer/StorageExplorerStore.js
+++ b/studio/localStores/storageExplorer/StorageExplorerStore.js
@@ -1183,9 +1183,18 @@ class StorageExplorerStore {
}
const options = { limit: LIMIT, offset: OFFSET, sortBy: { column: this.sortBy, order: this.sortByOrder } }
- const { data: folderContents } = await this.supabaseClient.storage
- .from(this.selectedBucket.name)
- .list(formattedPathToFolder, options)
+ let folderContents = []
+
+ for (;;) {
+ const { data } = await this.supabaseClient.storage
+ .from(this.selectedBucket.name)
+ .list(formattedPathToFolder, options)
+ folderContents = folderContents.concat(data)
+ options.offset += options.limit
+ if (data.length < options.limit) {
+ break
+ }
+ }
const subfolders = folderContents?.filter((item) => isNull(item.id)) ?? []
const folderItems = folderContents?.filter((item) => !isNull(item.id)) ?? []