I am working on a blockcahin based image sharing website in ethereum
function uploadImage(string memory _imgHASH,string memory _description ) public{
//making sure image ipfs hash exist
require(bytes(_imgHASH).length > 0);
//making sure that the image description exist
require(bytes(_description).length > 0);
require(msg.sender != address(0));
//increment image id
imageCount ++;
//add image to contract
images[imageCount] = Image(imageCount,_imgHASH,_description,0,msg.sender);
//trigger an image
emit ImageCreated(imageCount, _imgHASH, _description, 0, msg.sender);
}
This is how you upload images but now I want user to delete images created by them how do i do it?