Started adding the Amazon S3 Chunk Service, so far Uploading, Downloading, and Streaming video works

This commit is contained in:
subnub
2020-04-17 01:20:54 -04:00
parent 4821c5a408
commit 4a03523c96
8 changed files with 220 additions and 10 deletions
+1 -1
View File
@@ -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)))