upload
talawa-api / config/multer / upload
Variable: upload
> const
upload: Multer
Multer upload configuration.
This configuration sets up multer to use memory storage, applies the file filter, and sets a file size limit for uploads.
Returns
A multer instance configured for handling uploads.
Example
const uploadMiddleware = upload.single("file");
app.post("/upload", uploadMiddleware, (req, res) =\> \{
res.send("File uploaded successfully!");
\});