deleteImage
talawa-api • Docs
talawa-api / utilities/deleteImage / deleteImage
Function: deleteImage()
> deleteImage(imageToBeDeleted
, imageBelongingToItem
?): Promise
<void
>
Deletes an image file if it meets deletion criteria based on usage and duplicate checks.
Parameters
• imageToBeDeleted: string
The path of the image file to be deleted
• imageBelongingToItem?: string
Optional. Indicates if the image belongs to a specific item for duplicate check
Returns
Promise
<void
>
A promise that resolves once the image is successfully deleted