Skip to content

Latest commit

 

History

History
38 lines (21 loc) · 1.1 KB

utilities_uploadImage.md

File metadata and controls

38 lines (21 loc) · 1.1 KB

talawa-api / Exports / utilities/uploadImage

Module: utilities/uploadImage

Table of contents

Functions

Functions

uploadImage

uploadImage(newImageFile, oldImagePath): Promise<{ imageAlreadyInDbPath: string ; newImagePath: string }>

This function uploads the new image and deletes the previously uploaded image if exists.

Parameters

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.

Returns

Promise<{ imageAlreadyInDbPath: string ; newImagePath: string }>

Path of an uploaded image.

Remarks

This is a utility method.

Defined in

src/utilities/uploadImage.ts:16