I’m interested in how other people handle using Bubble’s native file storage solution. I know a lot of people will say ‘just don’t’ and use AWS but I still want to hear some practices that people are using to make it easier.
The problem is that it’s not straightforward to search the database for Files, and it’s easy for files to become orphaned such that they can only be deleted from the editor.
My current workflow is that whenever a file is uploaded to the site, a new File is created. File is a data type that contains the file, file’s name, the User/Thing that uploaded it, and any other app specific stuff.
That means that instead of using file (bubble file) fields, I use File fields (the File data type) when I want to reference file’s in the database. So, if I wanted to show a project RFP’s document it would be something like Project Request’s File’s file.
This also means I can create folder-like structures on the app by having a Folder data type and a list of Folders and Files on each folder, and people can rename displayed files within Bubble (although not the file itself).
Are there any other tricks I’m missing? This has just become my go to method to avoid the file manager overflowing - to delete a user’s files you just Do a search for Files of that User and recursively delete them. Hoping to learn something new