It is necessary that when you open the page in the browser in the text box, you can enter the URL of the file, after which JavaScript downloaded it, processed and displayed. I tried to do it via XmlHttpRequest like this:
var request = new XMLHttpRequest(); request.open('GET', url, false); request.overrideMimeType('text\/plain; charset=x-user-defined'); request.send(); var data; if(request.status === 200) { return stringToByteBufferData(request.response); } But it only works if the page is on the same domain as the file. Is it possible to make it download a file via any direct link?
PS The request is synchronous, because it is more convenient for me, and the delay is insignificant - the file processing takes an order of magnitude more than downloading it.
XMLHttpRequest, where to register - in response to the server. depends more specifically on the server - Grundy