![](/img/trans.png)
[英]Javascript: how to send a file from to server with save as dialog box
[英]How to download file from server and save it with dialog
我正在嘗試從目標server
下載文件,收到文件后,我想打開一個對話框,然后選擇保存位置。
到目前為止,我僅用於簡單下載:
<a class="button" type="application/octet-stream" href="http://localhost:5300/get" download>Click here for dld</a>
我已經讀到我需要使用FileApi
來實現此目的,但是仍然不能在所有瀏覽器中使用。
我如何設法打開對話框?
只是用那個
<a href="data:application/octet-stream;charset=utf-8,your code here" download="filename.extension">Save as</a>
嘗試使用有助於處理下載操作的jquery.fileDownload.js
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.