Started adding the Amazon S3 Chunk Service, so far Uploading, Downloading, and Streaming video works
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
const streamToBuffer = (stream: any) => {
|
||||
const chunks: any[] = []
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise<Buffer>((resolve, reject) => {
|
||||
stream.on('data', (chunk: any) => chunks.push(chunk))
|
||||
stream.on('error', reject)
|
||||
stream.on('end', () => resolve(Buffer.concat(chunks)))
|
||||
|
||||
Reference in New Issue
Block a user