Bubble FileManager and delete multiple files / workflow?

Hi,

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.

Anybody has solution for this ?

You can use the “Bulk” feature for this. You’ll need to be on a paid plan though.

Thanks @jacobgershkovich but I can’t see this bulk feature is on File Manager -tab page. My files are not attached to any App data type.

Whoops. Read your post too quickly. I don’t know of any workarounds with this one :frowning:

Second this. WE NEED File Manager development.

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.

Screen Shot 2020-08-05 at 12.04.12 AM

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.

5 Likes

Live update…just investigated if you do not already have the URL saved as a data field if you can still access that data and you can!

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 )

Screen Shot 2020-08-05 at 12.14.39 AM

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

Nice.

2 Likes

Hey @boston85719, I have a similar case where I want to delete files that I no longer use on my app.

So, I created a recursive workflow to delete these files. (see image below).

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.

I have tried “Saved to S3” instead of “'s URL” (see First image reference) but both have the same outcome.

I’d appreciate if you could shed some lights on the case.

Your Workflow search is wrong I believe

Should be

‘search for catalogues :first item Foto URL’

Hey @boston85719 thanks for replying.

It is working :slight_smile: . This is what I get when I check the server logs.


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 :confused:. 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.

Hi @dfduqu01 , I had this similar issue and solved it by adding the prefix “https:

I noticed that the Url that Bubble gives you doesn’t contain “https:” and it’s only like “//s3.amazonaws.com/appforest…”

In the image below, you can see how I added this prefix :

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.

Hope it works to you too.

Regards !

1 Like

Hey @juancamilovasquezard thank you for your input on this matter.

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 :clap:

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?


Select one item - then you can see in the middle that you can choose all files

@boston85719

I have the following 2 questions regarding the File Manager in Bubble:

  1. 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?

  2. 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?

Thank you!
Dodo

  1. Need to have a reference to the URL of the file. If you don’t it is very difficult.

  2. I’ve seen this in past but not recently. Bit of a quirk I guess. Don’t expect it to be available for long.