talawa-api / Exports / utilities/deleteImage
▸ deleteImage(imageToBeDeleted
, imageBelongingToItem?
): Promise
<void
>
This function deletes an image if it is only used once. It is also ensured that the image hash isn't used by multiple users/organization before deleting it After deleting the image, the number of uses of the hashed image are decremented by one.
Name | Type | Description |
---|---|---|
imageToBeDeleted |
string |
Path of image |
imageBelongingToItem? |
string |
Does image belong to an item |
Promise
<void
>