Kind time of the day, download the file already in advance of the specified path.

as here

document.getElementById("myBtn").addEventListener("click", function() { var reader = new FileReader(); reader.addEventListener('load', function() { document.getElementById('file').innerText = this.result; }); reader.readAsText(document.querySelector('input').files[0]); }); 
 <input type="file"> <button id="myBtn">Try it</button> <pre id="file"></pre> 

but without the web, let's say

 var input = "C:\katalog.xls"; 

At the exit ready Blob

Additional

there is such an option, but it is not clear how to specify a file from the disk, only you can file from the root folder.

 var oReq = new XMLHttpRequest(); oReq.open("GET", "*.doc", true); //oReq.open("GET", jsonObject, true); oReq.responseType = "blob"; oReq.onload = function(oEvent) { var blob = oReq.response; insertFile(blob); // ... }; oReq.send(); 

  • What is the question? - Grundy
  • How to upload a file without a html form, if you do not specify the path directly because the element is not Blob, how to pick up the file and transfer it to Blob - KazakOFF Lab
  • in the browser - no way. - Grundy
  • Here you are mistaken, there is such a method, but it does not suit me slightly. var oReq = new XMLHttpRequest (); oReq.open ("GET", "", true); //oReq.open("GET ", jsonObject, true); oReq.responseType = "blob"; oReq.onload = function (oEvent) {var blob = oReq.response; insertFile (blob); // ...}; oReq.send (); - KazakOFF Lab Nov.
  • I'm not mistaken - XMLHttpRequest - allows you to make a request to the server , since you want to take a local file - this does not help you and does not apply to the main issue. - Grundy

0