piclist 1.6.9 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/picgo-server CHANGED
@@ -129,6 +129,11 @@ const multerStorage = multer.diskStorage({
129
129
  cb(null, tempDir)
130
130
  },
131
131
  filename: function (_req, file, cb) {
132
+ if (!/[^\u0000-\u00ff]/.test(file.originalname)) {
133
+ file.originalname = Buffer.from(file.originalname, 'latin1').toString(
134
+ 'utf8'
135
+ )
136
+ }
132
137
  cb(null, file.originalname)
133
138
  }
134
139
  })