javascript – Download big file in chunks from s3 and save it to disk in browser with aws sdk v3

I would like to download big file in chunks from s3 and save it to disk in browser and I am trying to do this with something like github.com/awsdocs/aws-doc-sdk-examples/blob/c682a07a1e6abce793e3c32ef3b9661fa723d0ff/javascriptv3/example_code/s3/scenarios/multipart-download.js#L38

How can I create a writable stream or temporary file in browser, so I can save it later on disk with somehing like

let blob = new Blob([data.Body], {type: data.ContentType});
let link = document.createElement('a');
let filename = key.replace(selectedFolder, "");
link.href = window.URL.createObjectURL(blob);
link.download = filename;
link.click();

Read more here: Source link