implement cancel function on readableStream

This commit is contained in:
Abhinav 2022-10-16 20:30:32 +05:30
parent 88472571bb
commit ac00297abe

View file

@ -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;
}; };