I have trying to search how I can delete like 950 files from my file storage.
Only way I can do this from bubble backend is to delete one by one.
I understood that there is not yet feature yet to check all files by single click.
But have anybody invented the way program this by using workflows?
I can’t find the way to ‘do search’ for files on bubble system. Because bubble ask me to be more specific about it, example “file name” or something.
Maybe this will not help you with your current problem but going forward understanding this limitation and how to work around it can.
Firstly, and most important, is you need to when uploading a file or an image (it’s really just a file) that you save the file URL…whenever you use the file uploader or the image uploader you are provided with this information, you just need to ensure you use it.
Then, once you have saved your file URLs in appropriate locations, you can run backend recursive workflows to delete them.
The filed you delete will be the URL you have stored on as a data field on some data type.
For example if you are deleting users after they fall off the app and have not been active for some time and you want to delete their profile images from your file storage, you will first delete the file URL and then delete the user data type – because if you delete the data type before the file URL using the ‘delete uploaded file’ you will not have that file URL in your database to reference.
I assume you do not have the URLs of the files saved somewhere to utilize this, but moving forward you can adjust things to enable it.
Another thing as well is ‘private files’
They allow you to ‘attach’ a file to a thing…the reference focuses on the usefulness for privacy rules but the file manager has the ‘attached to’
I don’t know this as I have not investigated it, but I suppose making use of the attached to through private files may enable an automatically deletion of the files attached to the thing when that thing is deleted…for example attach a profile image file to a user and delete the user and the attached files would be deleted as well from the file manager…I don’t know but assume it may function that way.
So that screen shot above shows I have a group with a data type set to ‘image-set’ and I have placed a button into that group. The workflow is using the parent groups image set ( parent of the button pressed which is inside of the group with data type ‘image set’ ) to extract the image (not the URL I saved to the database, but the actual image file itself saved )
@aum It is able to extract from that image file the URL of that image file.
What this means is if you know what data type those files you want to delete are from, you could set up a recursive workflow to delete them even if you didn’t previously have the URL saved as a data field.
However, when I check on my server logs, I notice that the file URL being erased is empty (See image below). Also, I don’t see the number of files in my file manager decreasing.
As you can see now we have a “File URL”. However, when I check on my file manager tab, I don’t see the number of uploaded files going down . I wonder if it takes some time for it to count the amount of uploaded file and that why the number remains static? Anyway, I’m just going to let the recursive workflow run for a while and check later.
FYI I’m trying to free up some space because I received an email that my application reached more than 60% of its file storage. That’s what I’m really trying to do here.
Then you can check in another browser if the picture was really deleted, because sometimes in the same browser, it will continue showing the picture because of the cache.
haven’t boarded this issue in a little while (been working on other stuff) so I decided to give your suggestion a try. It didn’t work but after a while tinkering with it it worked like this. See image below.
I checked on my file manager tab and the number of uploaded files is decreasing by the minute so it worked
I’m trying to free storage space since I received an email that my app is more than 60%of its file storage. I am currently trying to hook box.com to solve this problem but haven’t been successful. Any chance you’ve worked with box.com?
I have the following 2 questions regarding the File Manager in Bubble:
How can I know which images to delete in the File Manager if I have uploaded multiple of them that look very similar? Is there a way to understand which file in the file manager is not attached to anything in the front-end of the app?
I have deleted an image that I have used in the front-end of the app and it got deleted from the File Manager since I cannot see it anymore. However, when I go in the Design tab of the editor that image is still there… I was assuming that if you delete something from the File Manager then it would get deleted from everywhere in the app as well… What am I missing?