Update BlockBlobClient.uploadStream to use NodeJS.ReadableStream instead of Readable
See original GitHub issue- Package Name: storage-blob
- Package Version: 12
- Operating system: mac
- nodejs
- version: 14
- browser
- name/version:
- typescript
- version: 4
- Is the bug related to documentation in
- README.md
- source code documentation
- SDK API docs on https://docs.microsoft.com
Describe the bug
Due to this method using Readable
type rather than NodeJS.ReadableStream
type I cannot pass a standard Node.js readable stream. With this change, users can still pass Readable
types to the method since it implements NodeJS.ReadableStream
.
I previously tried to fix this with https://github.com/Azure/azure-sdk-for-js/pull/11483 but didn’t anticipate other methods require the Readable
type. Maybe i misunderstand the difference between it and NodeJS.ReadableStream
. In addition, maybe I need to do something in my own code.
In my specific instance I’m using Node.js and Busboy which defines its file type as NodeJS.ReadableStream
(https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/busboy/index.d.ts#L41)
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
BlockBlobClient class - Microsoft Learn
To perform a partial update of a block blob's, use stageBlock(string, HttpRequestBody, number, ... Uploads a Node.js Readable stream into block blob.
Read more >I want to upload files to Blob Storage NOT AS STREAMS ...
There is a function uploadFile of BlockBlobClient that can help to directly upload a local file to Azure Blob Storage, as the figure...
Read more >Stream | Node.js v19.3.0 Documentation
Readable streams use the EventEmitter API for notifying application code when data is available to be read off the stream. That available data...
Read more >How to Upload PDF Files to Azure Blob Storage Using Node.js
Then, we'll call its download method with parameter 0 to access the entire file. download returns a readable stream, so I've included a...
Read more >How To Work with Files Using Streams in Node.js - DigitalOcean
Transform streams: a duplex stream in which the output (or writable stream) is dependent on the modification of the input (or readable stream)....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey, @Ethan-Arrowood
Thanks for reaching us and good to know you have found the right approach. Yes, according to Readable’s definition, using wrap is the right approach. This is a valuable topic related to old vs new stream, and might help others as well.
Thanks, Jiachen
Close the issue as it’s a node.js usage related pattern and welcome feedback if anyone hit similar isse.