-1

I have a problem on opening files on windows. These files (.pdf, .doc, .xlsx, .png, .....) are on the server computer: B where my REST application (node, Expres, angularJS) is deployed. The client computer is rated A.

To open any file, I used this: require ('child_process'). exec (' start '"' + pathOfFile);

Except that this opens the file on the computer B. And I want the file to be open on the computer A few be the way.

Someone would have any idea ?

Thank you

Motra
  • 93
  • 1
  • 7

1 Answers1

0

I can't add a comment (50 rep point).

If I understand you correctly you are trying to download a file that is on a REST server? if so, try using a GET method on your client and use File System library on your node application to actually load the file. like here - example.

Dima Shivrin
  • 99
  • 2
  • 11