only have one item in database

Hi is it possible to have only one upload in a collection at anyone time, in other words if user uploaded an image and replaced it with another image the previous image would be deleted from the collection, only making available the very latest upload?