Possible to find and delete orphaned files?

I have lots of orphaned files as I previously didn’t know how to handle it properly.

Is it still possible to find and delete them easily? :sweat_smile:

(Doing it manually is not an option - I can’t identify them and there are thousands)

hi - did you ever find an answer to this question…? thx in advance

No easy way other than manually.

Almost all apps should have a File data type and whenever a file uploader is on the page. For handling uploads:

  1. 'Do when condition is true, only when file uploader’s value is not empty
  2. Create a new File and set the file field to File Uploader’s value (i.e save the file to a data type)

For handling deletions:

  1. Backend trigger that runs when a File is deleted (File now is empty)
  2. Runs action Delete an uploaded file on File before change’s file

That virtually guarantees you have no orphaned files from user uploads.

Unfortunately no. The only way is to hope that Bubble comes up with a solution in future :slight_smile: