Skip to main content

talawa-api / Exports / utilities/deleteImage

Module: utilities/deleteImage

Table of contents

Functions

Functions

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.

Parameters

NameTypeDescription
imageToBeDeletedstringPath of image
imageBelongingToItem?stringDoes image belong to an item

Returns

Promise<void>

Defined in

src/utilities/deleteImage.ts:12