firebase云功能https触发器最近无法处理多部分帖子请求

时间:2017-11-24 00:46:43

标签: javascript firebase google-cloud-functions multer

const multer = require('multer')
const upload = multer({
  storage: multer.MemoryStorage,
  fileSize: 6 * 1024 * 1024,
  files: 4
})

const app = express()
app.post('/publish', upload.any(), (req, res) => {
  var body = req.body
  console.log(body)  // print ‘{}’ when req is a multipart request
  console.log(req.files.length) // print ‘0’ even thought post data contains file
  …
})


exports.app = functions.https.onRequest(app)

任何事情都要好,直到几天前。所有依赖项都是最新版本

0 个答案:

没有答案