Skip to content

Commit ca70393

Browse files
authored
fix(upload): stream-wormhole require issue (#13)
1 parent 09acd78 commit ca70393

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/zh/guide/upload.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class UploadController extends Controller {
130130

131131
```js
132132
const path = require('path');
133-
const sendToWormhole = require('stream-wormhole');
133+
const { sendToWormhole } = require('stream-wormhole');
134134
const Controller = require('egg').Controller;
135135

136136
class UploadController extends Controller {
@@ -162,7 +162,7 @@ class UploadController extends Controller {
162162
同时上传多个文件的场景,不能通过 `ctx.getFileStream()` 来获取,只能通过以下方式:
163163

164164
```js
165-
const sendToWormhole = require('stream-wormhole');
165+
const { sendToWormhole } = require('stream-wormhole');
166166
const Controller = require('egg').Controller;
167167

168168
class UploadController extends Controller {

0 commit comments

Comments
 (0)