如何使用node.js(express.js)将带有上传文件的多部分/表单数据表单重新发送到其他服务器? [英] how to resend post multipart/form-data form with upload file to different server with node.js (express.js)?
本文介绍了如何使用node.js(express.js)将带有上传文件的多部分/表单数据表单重新发送到其他服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我将带有文件(enctype ="multipart/form-data")的表单发布到node.js(express.js框架),并且只想发送相同的发布请求,就像它只是发送到其他服务器一样.node.js的最佳方法是什么?
I post a form with file (enctype="multipart/form-data") to node.js (express.js framework) and just want to send this same post request like it is just to different server. what is the best approach in node.js?
推荐答案
删除express.bodyParser并尝试以下管道:
remove express.bodyParser and try pipes like these:
req.pipe(request('http://host/url/')).pipe(res)
这篇关于如何使用node.js(express.js)将带有上传文件的多部分/表单数据表单重新发送到其他服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文