expressjs / expressjs/multer

Wrap a request in a promise

Open
#1,175 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
12.1k
Forks
1.1k
Avg merge
8d 2h
Merged PRs (30d)
21

Description

I have a custom Templating system that requires me to have a file per path (/api, /url2 . . ;)
And i would like to get the content of a file uploaded, for example

module.exports = async (req, res) =>
{
var UploadManager = Router.GetModel("UploadManager", req);
if (req.method === "POST")
{
var uploadedFiles = await multer().single('avatar')(req,res);
console.log(multerUpload);
}
}

I know this code will not work but i want to give an example so maybe i can get an answer. Thanks =)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.