© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
1 reply
rankala

storgae.from.list returning all files, but without path

hi, i upload my files with a path like this:
const filePath =
${date.getFullYear()}/${date.getMonth()}/${uuid()}.${file.fileObj.name.split('.').pop()}
${date.getFullYear()}/${date.getMonth()}/${uuid()}.${file.fileObj.name.split('.').pop()}


in another part, i want a list of all files of path's in a bucket.
my guess, I need to do this:
const {data: files, error} = await supabase.storage.from('bucketid').list();
const {data: files, error} = await supabase.storage.from('bucketid').list();


But here, i only get an id and a name, but not the full path. i am missing the year and month. So this list is kinda useless, because i cant resolve the year and month. How ca i get the path, without sending a request for each image to the database, after I recived the list?

Here is a sample result:
[{
    "name": "Screenshot 2022-06-29 at 11.50.50.png",
    "id": "d1f3bc38-6416-45a0-94cf-9d1a66116562",
    "updated_at": "2022-08-09T21:13:31.048644+00:00",
    "created_at": "2022-08-09T21:13:31.048644+00:00",
    "last_accessed_at": "2022-08-09T21:13:31.048644+00:00",
    "metadata": {
        "size": 39662,
        "mimetype": "image/png",
        "cacheControl": "max-age=3600"
    }
}]
[{
    "name": "Screenshot 2022-06-29 at 11.50.50.png",
    "id": "d1f3bc38-6416-45a0-94cf-9d1a66116562",
    "updated_at": "2022-08-09T21:13:31.048644+00:00",
    "created_at": "2022-08-09T21:13:31.048644+00:00",
    "last_accessed_at": "2022-08-09T21:13:31.048644+00:00",
    "metadata": {
        "size": 39662,
        "mimetype": "image/png",
        "cacheControl": "max-age=3600"
    }
}]
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Multi file download from storgae
SupabaseSSupabase / help-and-questions
4y ago
List all files and subfiles in a bucket
SupabaseSSupabase / help-and-questions
13mo ago
Getting data from db but returning undefined
SupabaseSSupabase / help-and-questions
5w ago
Storage.List not returning documented fields
SupabaseSSupabase / help-and-questions
13mo ago