我需要使用写入流使用@azure/storage-blob
将数据上传到Node.js中的Azure Blob存储容器。
似乎uploadStream
仅接受nodejs ReadStreams。
如何将WriteStream转换为ReadStream,以便可以将其传递给uploadStream
函数。
使用PassThrough工作!
const stream = new PassThrough()
this.containerClient.getBlockBlobClient(filePath).uploadStream(stream)
return stream