reuploadDuplicateCheck
talawa-api • Docs
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.