Skip to content

Repository files navigation

Multer middleware flow

User Uploads File
                    │
                    ▼
      file.originalname = "react.pdf"
                    │
                    ▼
  path.extname(file.originalname)
                    │
                    ▼
                ".pdf"
                    │
                    ▼
     allowedExtensions.test(".pdf")
                    │
           ┌────────┴────────┐
           │                 │
        true              false
           │                 │
           ▼                 ▼
 cb(null, true)      cb(Error, false)
           │                 │
           ▼                 ▼
  File Accepted      File Rejected

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages