Skip to content

Commit

Permalink
update express-formidable & fix #290 #416
Browse files Browse the repository at this point in the history
  • Loading branch information
nswbmw committed Aug 15, 2018
1 parent 75bd005 commit c3a5d53
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion book/4.2 准备工作.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
运行以下命令安装所需模块:

```sh
npm i config-lite connect-flash connect-mongo ejs express express-formidable express-session marked moment mongolass objectid-to-timestamp sha1 winston express-winston --save
npm i config-lite connect-flash connect-mongo ejs express express-session marked moment mongolass objectid-to-timestamp sha1 winston express-winston --save
npm i https://github.com:utatti/express-formidable.git --save # 从 GitHub 安装 express-formidable 最新版,v1.0.0 有 bug
```

对应模块的用处:
Expand Down
2 changes: 1 addition & 1 deletion book/4.7 注册.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ router.get('/', checkNotLogin, function (req, res, next) {

## 4.7.3 注册与文件上传

我们使用 [express-formidable](https://www.npmjs.com/package/express-formidable) 处理 form 表单(包括文件上传)。修改 index.js ,在 `app.use(flash())` 下一行添加如下代码:
我们使用 [express-formidable](https://github.com/utatti/express-formidable) 处理 form 表单(包括文件上传)。修改 index.js ,在 `app.use(flash())` 下一行添加如下代码:

**index.js**

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"connect-mongo": "2.0.1",
"ejs": "2.5.7",
"express": "4.16.2",
"express-formidable": "1.0.0",
"express-formidable": "git+https://github.com/utatti/express-formidable.git",
"express-session": "1.15.6",
"express-winston": "2.4.0",
"marked": "0.3.12",
Expand Down

0 comments on commit c3a5d53

Please sign in to comment.