createReadStream
This commit is contained in:
		
							parent
							
								
									089332dfaa
								
							
						
					
					
						commit
						85c284ea94
					
				| 
						 | 
					@ -13,7 +13,7 @@ async function uploadVideo(video) {
 | 
				
			||||||
    endpoint: 'https://gateway.storjshare.io'
 | 
					    endpoint: 'https://gateway.storjshare.io'
 | 
				
			||||||
  })
 | 
					  })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const videoFile = fs.readFileSync(video)
 | 
					  const videoFile = fs.createReadStream(video)
 | 
				
			||||||
  await s3.upload({
 | 
					  await s3.upload({
 | 
				
			||||||
    Bucket: 'video',
 | 
					    Bucket: 'video',
 | 
				
			||||||
    Key: video.split('/')[2],
 | 
					    Key: video.split('/')[2],
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue