Skip to main content

upload

talawa-api


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!");
\});

Defined in

src/config/multer/index.ts:63