第一个参数是pathLike,看文档以为可以直接传入Buffer类型,但是实际会报错,
解决方法
const stream = require('stream')
const reader = new stream.PassThrough().end(buffer)
reader是转换后的ReadStream类型,buffer是Buffer类型
2024-01-03 18:29:16
const stream = require('stream')
const reader = new stream.PassThrough().end(buffer)
reader是转换后的ReadStream类型,buffer是Buffer类型
下一篇:2021/10