Here what i am doing ,I am getting the file path from
var url = JSON.stringify(req.body.path);
which giving me the correct path but when i am using the passing the url inside the below chunk of code
fs.createReadStream(url).
pipe(bucket.openUploadStream('test.apk')).
on('error', function(error) {
assert.ifError(error);
}).
on('finish', function() {
console.log('done!');
res.send("Uploaded Sucessfully..")
process.exit(0);
});
};
I am getting below error
Error: ENOENT: no such file or directory, open 'E:\SomeServer\"..\apks\testappV1.0.0.apk"'
at Error (native)
but if i am hard coding
var url1 = '../apks/testappV1.0.0.apk';
the url1 is working perfdect with the above code why url not working i think i am doing some silly mistake not able to find , Can you please point out what i am doing wrong here.