3 ms·
That's the way to do if I want to just download a file. But the comments seem to be mentioning a scenario where they would like to download the file via Javascr
by thunderbong 5y ago
That's the way to do if I want to just download a file. But the comments seem to be mentioning a scenario where they would like to download the file via Javascript.
- TedDoesntTalk 5y agoI’m talking about saving data received from an asynchronous fetch response as a file on oval file system.
- CornCobs 5y agoYou can do anything with the DOM in javascript - you could create an anchor node then download the file automatically via a.click()
- TedDoesntTalk 5y agoThat's how I do it now. And it's an ugly hack. Why is it not natively supported?
- rasz 5y agoWhat would you consider a native support? ability to drop files on user drives without prompt?
- TedDoesntTalk 5y agoNo, of course not. I’m not talking about the user experience. I’m talking about native support in the fetch API to take downloaded data and save it to a file. User experience might be the user being prompted for a location, etc, just like now when saving a file through a hyperlink download.