Merge pull request #86 from ente-io/implement-stream-cancel

implement cancel function on readableStream
This commit is contained in:
Abhinav Kumar 2022-10-18 18:01:49 +05:30 committed by GitHub
commit c4699594aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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