How to solve a problem of images disappearing in the database

Hello everyone. My app is a real estate management, so users upload photos of properties. It can happen that users already upload photos already present in the file manager and in the database. I noticed that the photo that was already there before still exists in the file manager, but it is no longer visible.

This happens because the file has the same name and extension as the one already present.

Did any of you clash about this and solved it? I can’t imagine a way to simply change the name of the file that is being uploaded..

Thanks to those who will answer..

No idea?

What exactly do you mean?

Let’s say I uploaded 20 photos. Each of these on Database bubble of course. I keep in my list of things the links of these photos that I then show on my app. I noticed that if I subsequently insert the same photo again, already present in the bubble, the first photo disappears. The link remains but the file is inaccessible. It’s as if he replaced it. How can I overcome this? The easiest way would be to force the file name while uploading, but I saw that it is not possible..