0

I am using angularjs.I am getting zip file URL from the server.

I am using below code to download my file.

<a href="{{filename}}" download="{{filename}}">Example 1</a>

Filename comes from the angular controller.

From the above code I will be able to download the file but in the download folder.How can I download that file in specified location ?

krish
  • 79
  • 1
  • 8
  • 2
    Possible duplicate of [how to download a zip file using angular](http://stackoverflow.com/questions/30158115/how-to-download-a-zip-file-using-angular) – Sorangwala Abbasali Feb 21 '17 at 09:50

1 Answers1

0

just open that link in new tab it will automatically be download.

window.open(wholeURLToDownload);

Jaimin Raval
  • 146
  • 5
  • Thanks JaiminRaval it is working but I want to download and save that file in the pre defined location.How can I do that ? – krish Feb 21 '17 at 10:16
  • can you download a file from chrome in specified folder? The same is the answer for your question. – Ankit Agarwal Feb 21 '17 at 11:26
  • you can set the default download location first and then try to download, it will be downloaded into that specified folder – Jaimin Raval Feb 21 '17 at 11:34