How to make picture uploader remove previous picture (dynamic image) when uploading new one

So I’m new to bubble and I’ve been having a hard time creating a feature where users can upload a list of profile photos. First I tried doing this in a repeating group but I wasn’t able to do it for several reasons. The I tried doing each picture uploader individually and it kinda worked.

Captura de ecrã 2022-08-20 143758

What I need to do is that when a user clicks on Picture Uploader #2 for example, and they upload a new picture, the dynamic image that was there previously is deleted from the users list of profile photos in the users data. Right now all it’s doing is adding the newly uploaded picture to the data base and switching the dynamic image to the new picture but the old picture is still in the user’s list of profile photos.

Also if there is a way to limit the amount of profile pictures a user can upload maybe that would also fix the problem.

Hello @sofsmendonca :wave:
You can try like this…

Also make sure your privacy rules are setup properly (Make sure your image field is selected)

1 Like

Thank you so much, it worked!
Btw, do you know a way to make groups completely invisible and not clickable? I did the “remove current user’s display_images:first item” in a group on top of the picture uploader but the group is making it impossible to click on the picture uploader even when it’s empty.
I created these conditions but they’re not working for some reason.
The group is invisible but I still can’t click on the uploader.

Captura de ecrã 2022-08-20 163636

1 Like

Hi @sofsmendonca
Sorry i didn’t understood your question :confused: ?

My problem is that even though the group is not visible and not clickable, I’m still not able to click what is under it.

So my question is - what do I have to do to be able to click what’s under the group while it is invisible?

Hi @sofsmendonca :wave:
Sorry i am not sure how to do that :confused:

This topic was automatically closed after 70 days. New replies are no longer allowed.