We just added an action to delete a file from your application’s storage. You just need to specify the URL of the file to delete.
Keep in mind that deleting a file is different from modifying a thing, and the deletion of a file will NOT be undone by version control for the database. Use this action with caution!!
Make a change to a Thing: File field = blank
Field is blank, so you can’t access the file via a Thing, but the file still exists in storage, and if you know the URL, you can still access.
Delete an uploaded file
File is completely removed from storage.
I kinda agree but We shouldn’t celebrate an overdue feature by asking for something we could build ourselves in bubble.
Would it not be pretty simple to build an admin section RG of our app to accommodate uploaded files not tied to a thing and use that as our aws storage admin
Can you provide an example for people to test? Also, make sure to test if the file is there in incognito mode, it will be cached locally in the browser for a while.
Using this test page, you can delete the file with no problems.
The file is set as a group state and the delete button deletes that group’s state file without problems.
How do you direct the action to a specific URL for files uploaded in the past?
I know the URL but can’t figure out how to set a state for that address using workflows.
I’ve tried setting a button action workflow that deletes the file URL but the file remains using this method.
It must be a formatting thing. In the test app, there’s an input with that fills in with the uploaded file’s URL. The delete button under it is pointed to delete that URL. I don’t think it is deleting the file.
Right, this page works because the file is set as a state for the group. But how do you delete a file that is already uploaded and all that you have is its URL? I create an action to delete an uploaded file - I paste the URL but it doesn’t delete the file.
I thought of assigning the URL to a state on page load but it doesn’t look like you can assign files from URL in that kind of workflow.
How do you point the delete file action at a specific URL?
That’s why I have the other button and text input included below. The input has the URL address of the file you upload on the page. The button is set for a delete action and the URL is set as the input’s value. This doesn’t seem to delete the file either.
I copied that into the input and the file deleted just fine.
What’s puzzling is that I’ve copied this exact process on my private app for a particular file that needs to be deleted. I paste the desired file URL into my private app’s input, click delete, and the file remains.
BTW, thanks for your help with this. I know you are very busy!
Are you sure the file is not deleted. Keep in mind that the file can be cached by the browser, so if you hit the URL after a deletion it can still be here for some time.
Same problem, I used this function to delete the file but this is not working. I can see the correct URL to be deleted but the URL remains eventhough I deleted the file and change browser (so not in the cache). I can also see the file(picture in this case) still remains in the database.
is there more actions to be done to delete this file?