createReadStream

This commit is contained in:
unknown 2023-06-04 12:34:27 +02:00
parent f7fcf871ec
commit 84d53983df
1 changed files with 1 additions and 1 deletions

View File

@ -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],