You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
StorageList provides a list of `items` and `prefixes` corresponding to the list of objects and sub-folders at a given Firebase Storage path.
295
+
296
+
```svelte
297
+
<StorageList ref="/" let:list>
298
+
<ul>
299
+
{#if list === null}
300
+
<li>Loading...</li>
301
+
{:else if list.prefixes.length === 0 && list.items.length === 0}
302
+
<li>Empty</li>
303
+
{:else}
304
+
<!-- Listing the prefixes -->
305
+
{#each list.prefixes as prefix}
306
+
<li>
307
+
{prefix.name}
308
+
</li>
309
+
{/each}
310
+
<!-- Listing the objects in the given folder -->
311
+
{#each list.items as item}
312
+
<li>
313
+
{item.name}
314
+
</li>
315
+
{/each}
316
+
{/if}
317
+
</ul>
318
+
</StorageList>
319
+
```
320
+
321
+
You can combine
322
+
282
323
### Using Components Together
283
324
284
325
These components can be combined to build complex realtime apps. It's especially powerful when fetching data that requires the current user's UID or a related document's path.
0 commit comments