Skip to content

Commit

Permalink
fix: formidable option API changes
Browse files Browse the repository at this point in the history
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
  • Loading branch information
Yukaii committed Dec 26, 2023
1 parent 96a589d commit 1b1ff89
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/imageRouter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ function checkImageValid (filepath) {

// upload image
imageRouter.post('/uploadimage', function (req, res) {
var form = new formidable.IncomingForm()

form.keepExtensions = true
var form = new formidable.IncomingForm({
keepExtensions: true
})

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

0 comments on commit 1b1ff89

Please sign in to comment.