From 3f2644080810958d5c240afb991da9312d827441 Mon Sep 17 00:00:00 2001 From: Muneer Alam Date: Wed, 20 Sep 2017 18:21:15 +0530 Subject: [PATCH] Update video.js Due to default encoding file write using stream was failing.This is the solution for below issue https://github.com/rajkissu/binaryjs-upload-stream/issues/1 --- lib/video.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/video.js b/lib/video.js index 3a687d3..e6b68f1 100644 --- a/lib/video.js +++ b/lib/video.js @@ -58,8 +58,9 @@ function list(stream, meta) { /** */ function request(client, meta) { - var file = fs.createReadStream(uploadPath + '/' + meta.name); - + //to go with larger file + var options = {flags: 'w', encoding: 'utf8',fd: null,mode: '0666'}; + var file = fs.createReadStream(uploadPath + '/' + meta.name,options); client.send(file); }