Skip to main content

reuploadDuplicateCheck

talawa-apiDocs


talawa-api / utilities/reuploadDuplicateCheck / reuploadDuplicateCheck

Function: reuploadDuplicateCheck()

> reuploadDuplicateCheck(oldImagePath, newImagePath): Promise<boolean>

Checks if a user or organization is attempting to re-upload the same image.

Parameters

oldImagePath: null | TypeImagePath

Path of the current image (could be a string, URL request object, or buffer object).

newImagePath: TypeImagePath

Path of the new image being uploaded (could be a string, URL request object, or buffer object).

Returns

Promise<boolean>

Promise that resolves to true if the images are identical, false otherwise.

Remarks

This is a utility method.

Defined in

src/utilities/reuploadDuplicateCheck.ts:48