Merge pull request #86 from ente-io/implement-stream-cancel
implement cancel function on readableStream
This commit is contained in:
commit
c4699594aa
|
@ -48,6 +48,9 @@ export const getFileStream = async (filePath: string) => {
|
||||||
await fs.close(file);
|
await fs.close(file);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async cancel() {
|
||||||
|
await fs.close(file);
|
||||||
|
},
|
||||||
});
|
});
|
||||||
return readableStream;
|
return readableStream;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue