talawa-api / Exports / utilities/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.
Name | Type | Description |
---|---|---|
filename |
string |
Name of file |
Promise
<void
>