I want to download the file using pkgcloud module . it is working fine. but here i have given local path and then it is downloaded there .but i don't want to give like that.so i have sent response back .i have got response as well but i don't know how to make that response as downloaded . which means when i click on the link it should download the file to local(not only in my local ) . I have written like this
server side :
var options = {
container :xxxxxxxxxx,
remote: "xxx/yyyyyyy"
}
pkgClient.download(options,function(err,result){
if(err) {
} else {
}
}).pipe(response);
client side :
httpclinet.get("/download",function(data)
{
console.log("Data is coming");
});
I got response in client callback but how to make it download ?
I hope any one help me ...