Do a search for File to address "rogue files" issue

I’ve tried various plugins and vanilla elements that handle files or images. At many instances while an upload takes place something client-side can go wrong which can result in an uploaded file - which means the file will be visible in Bubbles File Manager - but you won’t be able to capture the file in some sort of datatype. This leads to rogue files that take up space but can’t be accounted for in an automated way.

Any website tracking user files using the file uploader, the multifile uploader, bubbles rich text editor (that automatically uploads images and replaces the base 64 images with the image link), and similar plugins will stochastically fail. E.g. if the user uploads too many files at once, it the user has connection issues or if the user exits early with the browser. At some instances the workflow just fails to run for no apparent reason, even if it was one file, even if the connections was ok.

During development the rogue files that are being created can easily be spotted and deleted, or during personal use of your bubble app. It is also easy for the developer to spot if the script fails to run which happens when the blue loading bar doesn’t show up after the upload finishes, because this loading of the bar indicates the respective workflow that links the file link with a datatype after it has been uploaded.

If however you are trying to create a bubble app that manages many files for users this would cause an uncontrolled accumulation of files which will be registered to the app but there is no way of deleting them safely.

I am requesting a feature that would solve this problem permanently because any “hack” and many different plugins I’ve tried so far have failed, because it is not a problem of code. The code and the plugins work fine. But if the workflows fail to run right after the critical point of upload then they won’t be able to capture the information of uploaded file.

A “Do a search for > File” would solve this problem. This is the feature I am proposing as a solution, without knowing how realistic it is to implement. This would allow the developers to create backend workflows that can find unused files and then delete them or create the records of them that for any reason weren’t created in the first place.

If for some reason this feature isn’t feasible then I would like to see some other kind of feature that addresses the problem with the rogue files.


Great idea @BenjaminP

Been a year since you’ve posted this. Have you found any workarounds? We usually deal with large files (videos) and users leaving the page for some reason leaves us with large useless files or as what you’ve called them, “rogue files”

We can’t delete these said files via workflows since they don’t have any records in our DB. They are, however, in our file storage.

Would greatly appreciate any Bubbler out here that has any idea or workaround for this.


I haven’t tried this myself so I’m not sure if this will work or is a good way of doing it.

Create a backend workflow that will create a new database record. This can be a new Thing used for tracking uploaded files. This new record will link itself to the uploaded file.

You add some fields or modify/add workflows that can help you track if the file is being used. Then set up a recurring or schedule workflows to delete the rougue files linked to the records.

Hi @ihsanzainal84!

This is a really good workaround! Just need to refactor the DB structure a bit but this should do the trick! Appreciate the help, boss 🫡

1 Like