multer icon indicating copy to clipboard operation
multer copied to clipboard

Why Postman filename is right, but in the web I use formdata.append() the filename is rong?

Open TiuBen opened this issue 2 years ago • 1 comments

I use Postman to mock the post form-data My filename with Chinese words in the node.js console.log (file,originalname) is right but in my React I use formData.append("img", Image[0], Image[0].name); the nodejs console.log (file,originalname) is wrong

TiuBen avatar Aug 25 '23 16:08 TiuBen

The last stable version force latin1 encoding of all the headers including filename I created a PR that fixes the encoding by extending Multer API with unicode (or anything else) encoding https://github.com/expressjs/multer/pull/1210

Doc999tor avatar Aug 26 '23 17:08 Doc999tor