I need to transfer files from my local system to globally which means I will save the file in my system and I give the URL to anyone.

If someone click the url means the file needs to get download.

Even that system in not connected with my server.This all process will occur globally.

So how can i do this?

Here my code is:

 CaseRegistration.find(criteria, {}).populate({path:'caseData',select:'employment'}).exec(function (err, cases) {
            if (err) {
                return
            }
            res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(cases);//Here I will send the path of the files 
        })
};

So when the user click the path or URL of the file means the file needs to downloads

0 Answers