Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

multer-utf8

Package Overview
Dependencies
Maintainers
0
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

multer-utf8

Middleware for handling `multipart/form-data` and 'utf8' charset.

  • 1.4.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

multer-utf8 NPM version js-standard-style

multer-utf8 is a solution for latin1 charset issue.

busboy reads files with latin1 charset by default, which causes some problems with utf8 encoded files.

I fixed it by changing this part of code.

try {
  busboy = Busboy({ headers: req.headers, limits: limits, ßpreservePath: preservePath, defParamCharset: charset })
} catch (err) {
  return next(err)
}

Options

KeyDescription
dest or storageWhere to store the files
fileFilterFunction to control which files are accepted
limitsLimits of the uploaded data
preservePathKeep the full path of files instead of just the base name
charsetcharset of files. for example latin1, utf8

Support latin1

/**
* mutler for utf8 
* default charset is `utf8`
*/ 

const multerWithUTF8 = multer({
  ...mutlerOptions
})

// multer for latin1
const multer = multer({
  ...multerOptions
  charset: 'latin1'
});

Keywords

FAQs

Package last updated on 16 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc