How to delete an image from a record?

I am trying to figure out how to delete an image from a record. There are two questions on this:

  • first how do I actually delete an image that has been uploaded and stored in a field of a particular record
  • and two, how do I remove an image from the image picker. This is for the case where the user uploads an image and then decides that he does not want to store the uploaded image and wants to have the picker empty again

Any hints would be great, looked into the tutorials, the forum and explored multiple options with no success.

1 Like

Hmm for if you want to be able to add and remove images from a record, I think it might make sense to have a Images Collection, then link that collection to your other collection (say Posts). So a Post can have many images, but an image can only belong to 1 post). That way you can just delete the image without affecting the post. (I think how you are thinking about it is more of being able to store an Array inside a field in a record, but I don’t think Adalo does Arrays).

Hey Tony, your idea makes sense and that might work for the case you describe. For this case, I am not thinking of storing multiple images associated to one record. I am trying to solve the case where a user for example, in the Users collection has an image field for the profile image, once the image is uploaded, there is no way to delete that image from it. Basically be able to go back to a state where the profile does not have an image. You can change the image, but I think would be great if we could just delete the image, basically, I guess, be able to set the image field back to empty.

Hmm could you have an image stored and put a delete button that sets the image to that default image?

Yeah I thought of that, it is kind of a nice workaround, but still is “changing” the image not deleting it.

Hi, any update on this topic? Since images are stored at imgix I wonder if I delete a record in adalo whether the actual image is stored still at imgix ? How can I (permanently) delete it?

Thanks

If you delete the image in Adalo, it would be deleted.

1 Like

Hi Ben,

Does the deleted image from adalo records take some time until it is permanently deleted on imgix? because when I deleted the record, the imgix url was still able to open the image.
this also happens with files stored on Adalo AWS. when I delete a record with the file attached, I can still open the file using AWS URL.

I think it has a lot to do with the security issue. because the document uploaded to Adalo can be accessed by the public without security if someone has the URL

Thanks