Reputation: 9360
I am trying to download a file from a target server
and upon receiving the file i'd like to get a dialog opened and let me choose where to save it.
So far i just used for simple download:
<a class="button" type="application/octet-stream" href="http://localhost:5300/get" download>Click here for dld</a>
I have read that i need to use the FileApi
in order to achieve this but still it is not usable for all browsers.
How can i manage to get the dialog opened ?
Upvotes: 0
Views: 248
Reputation: 530
Try using jquery.fileDownload.js
which help to handle download operation
Upvotes: 1
Reputation: 986
Just use that
<a href="data:application/octet-stream;charset=utf-8,your code here" download="filename.extension">Save as</a>
Upvotes: 1