Just realized my app storage was bloated since even through i was deleting images that were no longer being used, I wasn’t deleting the associated file.
Now I have 100k files in the file manage but only 10k images being used in the app.
Is there a way to identify files in the file manager that aren’t associated with anything in the app database?
For all the files in File Manager only 2 have an ‘attached to’.
Maybe we can think about this in the future @lindsay.esterman for a Bubble Boost. I have seen this been reported lots of times by devs and it definitely would be a good addition for people to manage their app’s storage properly
Setup an external system to store the files you want to keep…then go through and run workflows to delete all the files that are currently in use. Then go through and check the box to select all that remain and delete them. Then re-populate your bubble db from the external system to get the files you wanted to keep back into the Bubble db.
Not pretty, not what anybody wants to do, but is an option
It would be a massively heavy workflow but what about something like:
Recursive workflow that looks at each File in File manager
If file doesn’t match any image URLs in the data type (i.e file not being used) - delete the file.
Yes, that could probably work too…just ensure the condition is looking at all data types with files. Maybe perform search of all data types with files, creating list of file urls as text list and use that list as the condition to check if file exists or not.