Skip to main content

talawa-api / Exports / utilities/reuploadDuplicateCheck

Module: utilities/reuploadDuplicateCheck

Table of contents

Type Aliases

Functions

Type Aliases

TypeImagePath

Ƭ TypeImagePath: string | InterfaceUrlRequestObject | InterfaceBufferObject

Defined in

src/utilities/reuploadDuplicateCheck.ts:15

Functions

reuploadDuplicateCheck

reuploadDuplicateCheck(oldImagePath, newImagePath): Promise<boolean>

This function determines whether a user or an organisation is attempting to re-upload the same profile photo or organisation image.

Parameters

NameTypeDescription
oldImagePathnull | TypeImagePathPath of a current Org/User image of type: TypeImagePath.
newImagePathTypeImagePathPath of a new image of type: TypeImagePath.

Returns

Promise<boolean>

If the identical image is trying to reuploaded, true; otherwise, false.

Remarks

This is a utility method.

Defined in

src/utilities/reuploadDuplicateCheck.ts:42