expectation(for: NSPredicate(format: "exists == true"), evaluatedWith: app.buttons["myButton"], handler: nil)
waitForExpectations(timeout: 5) { (error) -> Void in
if error == nil {
// Do other stuff and continue
}
}
//continue
使用multer将图像文件上传到Express服务器时出错
var storage = multer.diskStorage({
destination: (req, file, cb) => {
cb(null, '/home/innvoot/Desktop/Projects/innmee/innmee_api/classes/uploadedProfilePics')
},
filename: (req, file, cb) => {
cb(null, file.fieldname + "-" + Date.now() + "-" + file.originalname)
}
});
var upload = multer({storage: storage});
我检查了我所有的代码,只需要有足够的证据表明我想要的东西,就可以揭示我的很多项目。
如何处理此错误。
答案 0 :(得分:0)
您可以尝试,允许限制ar正文解析器吗?
app.use(bodyParser.json({limit:'5mb'}));
app.use(bodyParser.urlencoded({extended:true, limit:'5mb'}));