Uploading and Downloading Files: Streaming in Node.js
CRANK

While not as simple as using buffer APIs to upload and download files, streaming APIs are more efficient and scalable. In this post, you’ll learn how to stream files between clients, Node.js, and Oracle Database.Contents:OverviewUploading filesController logicDatabase logicDownloading filesController logicDatabase logicOverviewThe streaming APIs in Node.js are designed to leverage and simplify its evented nature. There are four different stream classes: Readable, Writeable, Transform, and Duplex. Readable streams (which includes Transform and Duplex) have a pipe method that can be thought of like the pipe command in Linux, where the standard output of one command can be piped into the standard input of another command. Here’s a command line example that takes the output from the ls (list) command and pipes it through the grep (search) command to show files that have the word “oracle” in the name:With Node.js, the syntax is a bit different. Instead of the pipe command, the pipe met…

jsao.io
Related Topics: Node.js Oracle HTTP