Skip to main content

talawa-api / Exports / utilities/imageExtensionCheck

Module: utilities/imageExtensionCheck

Table of contents

Functions

Functions

imageExtensionCheck

imageExtensionCheck(filename): Promise<void>

This function checks the extension of the file. If the extension isn't of type 'png', or 'jpg', or 'jpeg', then the file is deleted and a validation error is thrown.

Parameters

NameTypeDescription
filenamestringName of file

Returns

Promise<void>

Defined in

src/utilities/imageExtensionCheck.ts:10