Tag: busboy wistia

将上传的文件stream式传输到HTTP请求

我的目标是接受上传的文件,并使用Wistia Upload API将其传输到Wistia 。 我需要能够添加字段到HTTP请求,我不希望该文件触摸磁盘。 我正在使用Node , Express , Request和Busboy 。 下面的代码有两个console.log语句。 第一个返回[Error: not implemented] ,第二个返回[Error: form-data: not implemented] 。 我是Node新手,所以我可能做了一些根本性的错误。 任何帮助将非常感激。 app.use("/upload", function(req, res, next) { var writeStream = new stream.Writable(); writeStream.on("error", function(error) { console.log(error); }); var busboy = new Busboy({headers: req.headers}); busboy.on("file", function(fieldname, file, filename, encoding, mimetype) { file.on("data", function(data) { writeStream.write(data); }); […]