browser side , not node.
ReadableStream
/ WritableStream
works pretty well, but .pipeto
returns a Promise
of resolve on normal exit. If you want to cancel this pipe, what should I do?
for example:
async function saveToWebkitFS(url) {
const readable = (await fetch(url)).body;
//Chrome
const writeable = await webkitFSWrapper.createWriteStream(url);
return readable.pipeTo(writeable);
}
function abort(pipe) {
//
}