Delete image from database

No, you don’t have an Image datatype, so you can’t delete it from your database, as it’s not in your database.

The image is just a file, stored in your file storage, and set as a field on your user datatype.

In fact, you asked this exact same question the other day (maybe you forgot) which I already answered - the answer still applies:

Delete a thing from database - Need help / Database - Bubble Forum

But to recap the answer briefly:

‘Delete a Thing’ is for deleting ‘Things’ (DB entries of a specific datatype) from your database. You don’t have an Image datatype, so you can’t use this action. You could create an Image datatype (and it might not be a bad idea, but it depends on what data you need to store, and other use-case specifics), in which case you would then use this action to delete an Image ‘thing’, which would also automatically remove it from any field it was in on a User DB entry (you’d still need to delete the file, if you want to remove it from your file storage).

To clear a field just make changes to the thing (the current User) and leave the field (Image) value blank.

To delete a file use the ‘Delete an Uploaded File’ action (to delete the current User’s Image).

If you’re doing everything correctly and still can’t get things to work as you intend them too, then check in the debugger and/or your server logs to see in more detail where and when any issue could be occurring. Privacy rules are often a cause of issues, so make sure you’ve set the correctly as well.

6 Likes