有没有一种方法可以使用express,使路由消费者能够向终端发送输入流并读取它?
简而言之,我希望终端用户通过流式传输而不是multipart / form方式上传文件。就像这样:
app.post('/videos/upload', (request, response) => {
const stream = request.getInputStream();
const file = stream.read();
stream.on('done', (file) => {
//do something with the file
});
});
这可行吗?