3

I have an angular 2 project that allows me to download files through a service and I know the file has been successfully downloaded as I can see the following console message:

this.rest.getGeometry(this.stlLocation).subscribe(data => console.log('file downloaded successfully'));

A look at the Network tab in the "Developer tools" confirms that the download was successful.

is it possible to save the file to a local folder such as src/app/assets?

Thank you for your help,

Dino

Dino
  • 1,307
  • 2
  • 16
  • 47
  • Nope, only user is able to define path – FieryCat Jun 09 '17 at 16:15
  • OK, any idea in how to make the user save to a specific location of his choice and record that location for future use? – Dino Jun 09 '17 at 16:25
  • Check that one: https://stackoverflow.com/questions/44462162/javascript-save-file-via-data-url-in-ie/44462246#44462246 ; but I'm not sure that you would be able to record the location – FieryCat Jun 09 '17 at 19:35
  • I also have same problem. Need to write images in assets folder in angular2 app – Girish Rathod Mar 17 '18 at 09:46

0 Answers0