Tag: xhr
-
Download file using WinJS.xhr
Snippet to download a file using WinJS.xhr and save it. The file variable below is a StorageFile, result of pickSaveFileAsync. Note the usage of responseType: “blob” as an option to xhr, and how it is copied to the file stream with msDetachStream. I tried to use replaceWithStreamedFileFromUriAsync and writeBufferAsync, but never managed to make it…