Как объяснить код C: char * s = «привет» «мир»; [Дубликат]

Чтобы браузер загрузил файл, вам необходимо сделать такой запрос:

 function downloadFile(urlToSend) {
     var req = new XMLHttpRequest();
     req.open("GET", urlToSend, true);
     req.responseType = "blob";
     req.onload = function (event) {
         var blob = req.response;
         var fileName = req.getResponseHeader("fileName") //if you have the fileName header available
         var link=document.createElement('a');
         link.href=window.URL.createObjectURL(blob);
         link.download=fileName;
         link.click();
     };

     req.send();
 }
-9
задан Vlad from Moscow 18 April 2017 в 12:04
поделиться