跳到主要内容
CNode

node.js怎么获取文件上传的进度

社区
Bbuctyoyo发布于 13 年前最后回复 13 年前
376390

{ fields: { title: 'Hello World' }, files: { upload: { size: 1558, path: '/tmp/1c747974a27a6292743669e91f29350b', name: 'us-flag.png', type: 'image/png', lastModifiedDate: Tue, 21 Jun 2011 07:02:41 GMT, _writeStream: [Object], length: [Getter], filename: [Getter], mime: [Getter] } } }

这是请求的内容,请问一下,我怎么判断这个文件有没有上传完成到服务器,求大神教,纠结很久了,

查看回复

回复 (3)

F
fengmk2#313 年前

This option is useful if you need to bind to the "progress" event, for example.

F
fengmk2#213 年前

defer 参数

multipart.js#L43

L
leapon#113 年前

formidable 可以监测上传的进度。你找找例子吧。

参与回复

登录后即可参与回复。登录