This is in continuation to my previous post found here.
I thought it was working fine but I encountered a small issue
Basically I find that if I click remove file then it de-attaches the image from wordpress backend. But, if i directly upload another image without clicking remove image, then it is not de-attaching the image.
Hence, would there be a solution something like this:
if the image has been uploaded, then dont show the upload image button next to it? Only if there is no attached image or if the user clicks remove image, the upload button becomes visible?