经过更多研究后,我决定使用
restlermodule。这使得分段上传非常容易。
fs.stat("image.jpg", function(err, stats) { restler.post("http://posttestserver.com/post.php", { multipart: true, data: { "folder_id": "0", "filename": restler.file("image.jpg", null, stats.size, null, "image/jpg") } }).on("complete", function(data) { console.log(data); });});


