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
>