Bercovici Adrian
Bercovici Adrian

Reputation: 9360

How to download file from server and save it with dialog

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

Answers (2)

Selvam M
Selvam M

Reputation: 530

Try using jquery.fileDownload.js which help to handle download operation

http://jqueryfiledownload.apphb.com/

Upvotes: 1

Pascal Tovohery
Pascal Tovohery

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

Related Questions