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()}

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();

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"
    }
}]
Was this page helpful?