talawa-api / Exports / utilities/uploadImage
▸ uploadImage(newImageFile
, oldImagePath
): Promise
<{ imageAlreadyInDbPath
: string
; newImagePath
: string
}>
This function uploads the new image and deletes the previously uploaded image if exists.
Name | Type | Description |
---|---|---|
newImageFile |
any |
File of a new Image with any type. |
oldImagePath |
null | string |
File of a current Image. It can be null . |
Promise
<{ imageAlreadyInDbPath
: string
; newImagePath
: string
}>
Path of an uploaded image.
Remarks
This is a utility method.