Skip to content

Latest commit

 

History

History
33 lines (19 loc) · 833 Bytes

utilities_imageExtensionCheck.md

File metadata and controls

33 lines (19 loc) · 833 Bytes

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

Name Type Description
filename string Name of file

Returns

Promise<void>

Defined in

src/utilities/imageExtensionCheck.ts:10