How to extract metadata from specific folder. Retool Storage

Hello, im currently working on a mobile app and have a problem. I need to extract the metadata from a retool storage folder automatically. Any ideas how?

Hey @Shadow ,

can you provide more information or example how you want to use metadata ?

Thanks,
James

Hello @james.lee I would like to extract the metadata, and save the URL and created at in a variable

Hi @Shadow, happy to help! :slightly_smiling_face:

Make a query to extract the metadata, and filter the results to just get the ones where folderName === "yourFolder".

For example, this query gets me the files inside the folder named "folder1:"


From here, we can map the results into the urls and save them to a state variable or localStorage.

I’m sorry, thank you so much for your answer, for some reason I get this error. Any ideas why?

It may be because the query has not run yet, potentially a UI bug. If you run the query, are you getting the expected output?

If I run the query, with that part disabled it runs as expected, but if I run it with it enabled, it returns all the same files

That is odd. Could you share the output of the query without the transforming the results? Open the keys so we can see the properties of each file.