Deleting images from file manager

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’.

Bubble gives us nothing that helps for situations like this. Stuck manually deleting.

That is…not great.

So the options are:

  1. buy more storage
  2. manually go through 100k images to see if they are being used in the app?

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

cc @jayvee.nava

1 Like

These seems like an obvious win for all involved.

I want to delete 90k+ images (~40gb).

  • This is storage fees you won’t have to pay to your provider without reducing revenue from my app.
  • I get more capacity to grow into.
  1. 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

3 Likes

As much as I don’t like what you’re saying, I respect it :smile: .

Any external file system you rec?

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.

1 Like

R.e text list - do you mean pass a list of URLs (as text) into the workflow (see screenshot).

Since you can’t ‘do a search for’ on the files any idea how I would pass a list of all File URLs into the workflow?

This topic was automatically closed after 70 days. New replies are no longer allowed.