piping to createWriteStream to browser

Varun Garg Source

I am using a library that pipes a blob to file. Though I tried many ways, I am unable to use this functionality on browser, the code for node is:

var fout = fs.createWriteStream('./path/to/document'); // output stream to file
conn.sobject('Document').record(documentId).blob('Body').pipe(fout)

I want to do this on a browser, and prefer the blob to be in a blob variable, so I can run urlCreator.createObjectURL(blob)

javascriptbrowsersalesforce

Answers

comments powered by Disqus