Skip to content

Commit 1b1ff89

Browse files
committed
fix: formidable option API changes
Signed-off-by: Yukai Huang <[email protected]>
1 parent 96a589d commit 1b1ff89

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/imageRouter/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ function checkImageValid (filepath) {
3232

3333
// upload image
3434
imageRouter.post('/uploadimage', function (req, res) {
35-
var form = new formidable.IncomingForm()
36-
37-
form.keepExtensions = true
35+
var form = new formidable.IncomingForm({
36+
keepExtensions: true
37+
})
3838

3939
form.parse(req, function (err, fields, files) {
4040
if (err || !files.image || !files.image.filepath) {

0 commit comments

Comments
 (0)