Skip to content

Commit 16b7696

Browse files
committed
format
1 parent 5677d36 commit 16b7696

File tree

18 files changed

+18
-4
lines changed

18 files changed

+18
-4
lines changed

README.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ http://nodejs.org/download/
1717
国内的用户可以访问山寨网站
1818
http://lodejs.org/download/
1919
~~~
20-
安装好node后,就可以了。
2120

22-
启动的方式
21+
本教程包含7个demo,安装好node后,就可以挨个运行它们了。
2322
~~~bash
2423
windows
2524
下载zip文件,然后解压到c盘
@@ -34,7 +33,7 @@ $ sudo node demo1/server.js
3433

3534
类推,运行demo2的时候,去执行demo2下的server.js就可以了。
3635

37-
然后在浏览器中执行
36+
然后在浏览器中(建议chrome)执行
3837
~~~
3938
http://localhost
4039
~~~
@@ -55,8 +54,23 @@ $ node server.js 3000
5554
前端index.html,使用一个input标签进行文件选择,然后使用form表单发送数据。
5655
后端server.js(没错~后端程序也由我们编写),对表单发过来的数据进行解析,并用便于观察的方式打印出来。
5756

58-
TIP: 观察。注意这个词。它是我们本次学习之旅的主要方法。你一定要运行每个例子,亲眼看到它们的结果。
57+
点击 选择文件 后
58+
![1.1.png](img/1.1.png)
5959

60+
在点击 Upload 按钮之前,对网络进行限速,方便观察数据传输的过程
61+
![](img/1.2.png)
62+
点击后,选取
63+
![](img/1.22.png)
64+
65+
服务端会打印下面的提示,注意红框中的token,它用来表示二进制数据的边界。
66+
![](img/1.3.png)
67+
你在server.js中可以看到解析http数据的formidable函数。
68+
你可以调试它,用来学习http协议。
69+
70+
上传完成后
71+
![](img/1.4.png)
72+
73+
__TIP__: 观察。注意这个词。它是我们本次学习之旅的主要方法。你一定要运行每个例子,亲眼看到它们的结果。
6074
它们发生了、产生结果了,你眼见为实了、反复的确认后,就熟悉了这个技术。
6175

6276
## <a name="demo2"></a>2、plupload的原理

demo3/1.1.png

-24 KB
Binary file not shown.

demo3/1.2.png

-23.9 KB
Binary file not shown.

demo3/3.png

-21.8 KB
Binary file not shown.

demo4/1.1.png

-24 KB
Binary file not shown.

demo4/1.2.png

-23.9 KB
Binary file not shown.

demo4/3.png

-21.8 KB
Binary file not shown.

demo5/1.1.png

-24 KB
Binary file not shown.

demo5/1.2.png

-23.9 KB
Binary file not shown.

demo5/3.png

-21.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)