When I have images in storage, how can I reach the...
# help
d
When I have images in storage, how can I reach them in my frontend?
Copy code
export async function getStaticProps() {
  let { data } = await supabaseAdmin.storage.from("gallery").select("*");
  return {
    props: {
      images: data,
    },
  };
}
This doesnt work.
n
Hello @Dembe! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates. Want to change the title? Use the ``/title`` command! We have solved your problem? Click the button below to archive it.
g
You would normally use https://supabase.com/docs/reference/javascript/storage-from-list to get a list of your files (with folder and search options) and then loop and load.
d
Thanks a lot, will try this out, is it possible to get childfolders in this? from like categories > sport > football and retrive allf rom sport, and maybe all from football?
g
Yes. Just use ‘categories/sports/football’ for folder
d
thanks it worked. Maybe this is a dumb question, but, i have categoires/sport, but in sport i have 2 folders with images in those. Is it possible for calling like categories/sport and grab all images from all subfolders in there?
g
Sorry don't know. All I have is the docs to go by without digging into the storage code.