Forum Academy Marketplace Showcase Pricing Features

[New Feature] Delete file action

Can you share a link?

I created a quick test page to delete a picture file:

Upload a picture file under a user profile
see the URL link to make sure there is a link
delete the file via this function

I expect to have the URL deleted when I click on the delete button but the file is still there. I probably miss something.
Let me know if you can add the missing part.

What you’re deleting here is the actual file, you’re not modifying the user object. You should do both.

If you try hitting this URL in private mode, you’ll see the file isn’t there any more.

1 Like

You mean that I have to upload an empty picture in a sense to clear the image profile:



1 Like

thank you Emmanuel, it works and was even able to use the default URL of an avatar picture instead of leaving a blank image.
Thank you for your support.

One little bug (I believe). If you enter the name of a file that does not exist such as “test” the work flow still runs through. So you can’t trap the error.

To replicate:

  1. Create input field

  2. Create a button “Delete”

  3. On button click, workflow as follows

  4. Set state deleteState=“Attempting to delete file”

  5. Delete action on item in input field

  6. Set state deleteState=“File deleted”

  7. Create new workflow item Delete Button had an error…

  8. Set state deleteState=“Problem deleting file”

Results on file “Test” is “File deleted”
File named “Test” never existed

Yes we did this by design, as I don’t think this is a bad error.


when can we expect an action to delete a list of files?


Yes please, I would like the feature to delete a list of files too. Or is there a workaround to delete one file in a list of files. I tried it with the workflow of gil06000 but nothing happened.

1 Like

I’d like to add to @AliFarahat note…is this something that might be considered on not even on the radar

Hi All!

Ran into an issue on one of the apps, and looking for community wisdom here.
It looks like if you delete the object in the DB, but not specifically delete a file via the WF step, it remains “orphaned” in the application, taking up space.

This may not be an issue for most of the apps, but if the app is working with a lot of large sized objects (e.g. high-res images) then this can quickly become an issue, because unless you’re cleaning\deleting all the files from day one, you may have quite the backlog of “orphaned” records\files that you cannot reach in any way from your application, since the objects that they were linked to are gone.

We ran into a case when we have few thousand orphaned files on the DB and no way to delete them except manually clicking on each one of them in the File Manager view.

Any ideas from the community and\or Bubble team of how this can be handled now as an intermediate solution until there are some more powerful file management flows\tools in the editor interface?

That’s quite a problem for our particular Bubble instance now, as it eats up 50-60% of app’s capacity for nothing :slight_smile:



Hey @emmanuel

Is there a way we can expose this in the plugin editor. So for example context.deleteContent(string: url)?


Is there a way to delete multiple files at once?

1 Like

I am also interested in a mass file deletion.
I have discovered that a call to an API that compresses images (Tinify), is uploading the images to Bubble. I don’t really understand why, because I haven’t used Bubble’s actions to upload files.

The thing is that I have more than 600 files that I need to delete and I don’t have a link anywhere to use the delete option that is available.

Can someone help me with this?
Thanks in advance.

1 Like

This is almost 3 years old topic, but I am just wondering if deletion of multiple files is still something yet to be implemented fro team?

Do anyone knows any workaround to delete multiple files. I am speaking about for example:

  1. I have a task with 5 files attached to it
  2. I delete task

Files are still visible in “Data / File Manager”

I know there is option to delete one file, but still no option to delete multiple files?

Please let me know if someone found solution. Also, please avoid suggesting backend workflows, etc. as none of these works.


Can’t you just run a recursive backend workflow (what do you mean they don’t work?)…

1 Like

Hi. Well, is that backend workflow including some API stuff as well? If yes, then I have to upgrade my subscription plan, which I plan to do soon. But was wondering if there is other way, without need to upgrade subscription, while I am still testing my app. Thank you!

If it’s just a few files then you can do this client side. Use a plugin like Ultimate Toolbox and run the ForEach function. In reality, the backend workflow is the best option though for larger workloads.

1 Like

Ok, so I am trying ForEach, and I am stuck here:

In image above, I have set type to file and list is current page task files, which seems correct.

Then, in workflows I have added this as action after I click on delete task button:

So, it says (in image above, from workflow): “This process starts the iteration over the list provided in the element.”. My question is, where do I define which process to start? What will this action do? I have not defined that it should delete files anywhere.

Thank you!